From b1e8b38d93fdd1c5ef015ed2653abf037569d2b6 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Mon, 13 Aug 2012 13:27:25 +0200 Subject: Add convenience wrappers for the DPCP and MPCP For consistency reasons and to document the cpu parameter of the DPCP. --- include/litmus.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) return od_openx(fd, PCP_SEM, name, &cpu); } +static inline int open_mpcp_sem(int fd, int name) +{ + return od_open(fd, MPCP_SEM, name); +} + +static inline int open_dpcp_sem(int fd, int name, int cpu) +{ + return od_openx(fd, DPCP_SEM, name, &cpu); +} + /* syscall overhead measuring */ int null_call(cycles_t *timestamp); -- cgit v1.2.2