aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-08-13 07:27:25 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-08-14 14:46:12 -0400
commitb1e8b38d93fdd1c5ef015ed2653abf037569d2b6 (patch)
tree6686d9bb1bb48c8ad8dc719f2002dacb8bcf0d48
parent9c0017144cc59762e9a79d453794f9aa8545a54f (diff)
Add convenience wrappers for the DPCP and MPCP
For consistency reasons and to document the cpu parameter of the DPCP.
-rw-r--r--include/litmus.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 3fa2a57..82e4bd1 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -151,6 +151,16 @@ static inline int open_pcp_sem(int fd, int name, int cpu)
151 return od_openx(fd, PCP_SEM, name, &cpu); 151 return od_openx(fd, PCP_SEM, name, &cpu);
152} 152}
153 153
154static inline int open_mpcp_sem(int fd, int name)
155{
156 return od_open(fd, MPCP_SEM, name);
157}
158
159static inline int open_dpcp_sem(int fd, int name, int cpu)
160{
161 return od_openx(fd, DPCP_SEM, name, &cpu);
162}
163
154 164
155/* syscall overhead measuring */ 165/* syscall overhead measuring */
156int null_call(cycles_t *timestamp); 166int null_call(cycles_t *timestamp);