shim_unistd.h 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _SHIM_UNISTD_H_
  2. #define _SHIM_UNISTD_H_
  3. #ifdef IN_SHIM
  4. #include "shim_types.h"
  5. #else
  6. #include <unistd.h>
  7. #endif
  8. #define __NR_msgpersist (LIBOS_SYSCALL_BASE + 1)
  9. #define MSGPERSIST_STORE 0
  10. #define MSGPERSIST_LOAD 1
  11. int msgpersist(int msqid, int cmd);
  12. #define __NR_benchmark_rpc (LIBOS_SYSCALL_BASE + 2)
  13. #define __NR_send_rpc (LIBOS_SYSCALL_BASE + 3)
  14. #define __NR_recv_rpc (LIBOS_SYSCALL_BASE + 4)
  15. int benchmark_rpc(pid_t pid, int times, const void* buf, size_t size);
  16. size_t send_rpc(pid_t pid, const void* buf, size_t size);
  17. size_t recv_rpc(pid_t* pid, void* buf, size_t size);
  18. struct nameinfo {
  19. char* host;
  20. size_t hostlen;
  21. char* serv;
  22. size_t servlen;
  23. };
  24. #define __NR_checkpoint (LIBOS_SYSCALL_BASE + 5)
  25. int checkpoint(const char* filename);
  26. struct sigcp {
  27. int si_session;
  28. };
  29. #define SI_CP_SESSION(info) (((struct sigcp*)&(info)->_sifields)->si_session)
  30. #define SIGCP 33
  31. #include "shim_unistd_defs.h"
  32. #endif /* _SHIM_UNISTD_H_ */