diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-01 13:03:15 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-01 13:03:15 -0400 |
commit | 708b97b2900775f3651cdf9ab04b4f512b4705bd (patch) | |
tree | f0e3343b058eb3f5e0abb6e3c9299f00173e17ac /include/litmus.h | |
parent | eddde9f7fd0442ad2c097988845b9f0e451dbd2f (diff) |
add convenience wrappers
Diffstat (limited to 'include/litmus.h')
-rw-r--r-- | include/litmus.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h index 1b0d006..a5d3e2e 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
@@ -85,6 +85,18 @@ static inline lt_t ms2lt(unsigned long milliseconds) | |||
85 | return __NS_PER_MS * milliseconds; | 85 | return __NS_PER_MS * milliseconds; |
86 | } | 86 | } |
87 | 87 | ||
88 | /* semaphore allocation */ | ||
89 | |||
90 | static inline int open_fmlp_sem(int fd, int name) | ||
91 | { | ||
92 | return od_open(fd, FMLP_SEM, name); | ||
93 | } | ||
94 | |||
95 | static inline int open_srp_sem(int fd, int name) | ||
96 | { | ||
97 | return od_open(fd, SRP_SEM, name); | ||
98 | } | ||
99 | |||
88 | 100 | ||
89 | 101 | ||
90 | #endif | 102 | #endif |