shim_unistd.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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) \
  30. (((struct sigcp *) &(info)->_sifields)->si_session)
  31. #define SIGCP 33
  32. #include "shim_unistd_defs.h"
  33. #endif /* _SHIM_UNISTD_H_ */