benchmark.c 608 B

123456789101112131415161718192021222324252627
  1. #include <errno.h>
  2. #include <sysdep-cancel.h>
  3. #include <sys/syscall.h>
  4. #include <kernel-features.h>
  5. #include <sysdep.h>
  6. #include <shim_unistd.h>
  7. #ifdef __NR_benchmark_rpc
  8. int benchmark_rpc(pid_t pid, int times, const void * buf, size_t size)
  9. {
  10. return INLINE_SYSCALL (benchmark_rpc, 4, pid, times, buf, size);
  11. }
  12. #endif
  13. #ifdef __NR_send_rpc
  14. size_t send_rpc (pid_t pid, const void * buf, size_t size)
  15. {
  16. return INLINE_SYSCALL (send_rpc, 3, pid, buf, size);
  17. }
  18. #endif
  19. #ifdef __NR_recv_rpc
  20. size_t recv_rpc (pid_t * pid, void * buf, size_t size)
  21. {
  22. return INLINE_SYSCALL (recv_rpc, 3, pid, buf, size);
  23. }
  24. #endif