aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-03-02 16:19:31 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-03-02 16:19:31 -0500
commit1d7d6d00b84f46016ec98c260f22d5e06036b473 (patch)
tree096464c2f2cd4d3bfb39f35a3daad19477f8a681
parentb2f366882c93e602e17ef65de12b854ac724412d (diff)
add null_call() system call
For kernel entry/exit tracing.
-rw-r--r--include/litmus.h4
-rw-r--r--src/syscalls.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 7ee13dc..c578009 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -4,6 +4,8 @@
4#include <litmus/rt_param.h> 4#include <litmus/rt_param.h>
5#include <sys/types.h> 5#include <sys/types.h>
6 6
7#include "cycles.h" /* for null_call() */
8
7typedef int pid_t; /* PID of a task */ 9typedef int pid_t; /* PID of a task */
8 10
9/* obtain the PID of a thread */ 11/* obtain the PID of a thread */
@@ -101,5 +103,7 @@ static inline int open_srp_sem(int fd, int name)
101} 103}
102 104
103 105
106/* syscall overhead measuring */
107int null_call(cycles_t *timestamp);
104 108
105#endif 109#endif
diff --git a/src/syscalls.c b/src/syscalls.c
index b2ab900..2c9a446 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -100,3 +100,8 @@ int release_ts(lt_t *delay)
100{ 100{
101 return syscall(__NR_release_ts, delay); 101 return syscall(__NR_release_ts, delay);
102} 102}
103
104int null_call(cycles_t *timestamp)
105{
106 return syscall(__NR_null_call, timestamp);
107}