diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-13 07:27:25 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-14 14:46:12 -0400 |
| commit | b1e8b38d93fdd1c5ef015ed2653abf037569d2b6 (patch) | |
| tree | 6686d9bb1bb48c8ad8dc719f2002dacb8bcf0d48 /include | |
| parent | 9c0017144cc59762e9a79d453794f9aa8545a54f (diff) | |
Add convenience wrappers for the DPCP and MPCP
For consistency reasons and to document the cpu parameter of the DPCP.
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus.h | 10 |
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 | ||
| 154 | static inline int open_mpcp_sem(int fd, int name) | ||
| 155 | { | ||
| 156 | return od_open(fd, MPCP_SEM, name); | ||
| 157 | } | ||
| 158 | |||
| 159 | static 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 */ |
| 156 | int null_call(cycles_t *timestamp); | 166 | int null_call(cycles_t *timestamp); |
