summaryrefslogtreecommitdiff
path: root/PACE/pace/posix/semaphore.h
diff options
context:
space:
mode:
Diffstat (limited to 'PACE/pace/posix/semaphore.h')
-rw-r--r--PACE/pace/posix/semaphore.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/PACE/pace/posix/semaphore.h b/PACE/pace/posix/semaphore.h
index 4cdf0d3dd04..e6ec9422f5e 100644
--- a/PACE/pace/posix/semaphore.h
+++ b/PACE/pace/posix/semaphore.h
@@ -13,8 +13,8 @@
*
* ============================================================================ */
-#ifndef PACE_SEMAPHORE_H_POSIX
-#define PACE_SEMAPHORE_H_POSIX
+#ifndef PACE_SEMAPHORE_H
+#define PACE_SEMAPHORE_H
#include <semaphore.h>
@@ -22,10 +22,36 @@
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */
-typedef sem_t pace_sem_t;
+ PACE_INLINE int pace_sem_close (sem_t * sem);
+
+ PACE_INLINE int pace_sem_destroy (sem_t * sem);
+
+ PACE_INLINE int pace_sem_getvalue (sem_t * sem, int * sval);
+
+ PACE_INLINE int pace_sem_init (sem_t * sem, int pshared, unsigned int value);
+
+ # define pace_sem_open(X) sem_open X
+ /* int fprintf (FILE *stream, const char *format, (*//* args *//*) ... );
+ *
+ * PLEASE PAY SPECIAL ATTENTION HERE!
+ * This is a macro and requires an additional set of parenthesis
+ * surrounding the arguments.
+ */
+
+ PACE_INLINE int pace_sem_post (sem_t * sem);
+
+ PACE_INLINE int pace_sem_trywait (sem_t * sem);
+
+ PACE_INLINE int pace_sem_unlink (const char * name);
+
+ PACE_INLINE int pace_sem_wait (sem_t * sem);
#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */
-#endif /* PACE_SEMAPHORE_H_POSIX */
+#if defined (PACE_HAS_INLINE)
+# include "pace/posix/semaphore.inl"
+#endif /* PACE_HAS_INLINE */
+
+#endif /* PACE_SEMAPHORE_H */