summaryrefslogtreecommitdiff
path: root/ace/os_include/sys/sem.h
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-20 14:32:29 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-20 14:32:29 +0000
commit313d763c57f0116ae8a4d516a339356e20578e19 (patch)
tree2f3d376496d8634487d22da4494ba47b13cedee8 /ace/os_include/sys/sem.h
parent5cb0ff6546c403f37cca5ec8228c1c4c6b08b300 (diff)
downloadATCD-OS-h_refactor.tar.gz
This commit was manufactured by cvs2svn to create branchOS-h_refactor
'OS-h_refactor'.
Diffstat (limited to 'ace/os_include/sys/sem.h')
-rw-r--r--ace/os_include/sys/sem.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/ace/os_include/sys/sem.h b/ace/os_include/sys/sem.h
new file mode 100644
index 00000000000..b4ac253c72d
--- /dev/null
+++ b/ace/os_include/sys/sem.h
@@ -0,0 +1,70 @@
+/* -*- C++ -*- */
+
+//=============================================================================
+/**
+ * @file sem.h
+ *
+ * $Id$
+ *
+ * @author Douglas C. Schmidt (schmidt@cs.wustl.edu)
+ * @author etc
+ */
+//=============================================================================
+
+#ifndef ACE_OS_INCLUDE_SYS_SEM_H
+# define ACE_OS_INCLUDE_SYS_SEM_H
+# include "ace/pre.h"
+
+# include "ace/config-all.h"
+
+# if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+# endif /* ACE_LACKS_PRAGMA_ONCE */
+
+# if !defined (ACE_LACKS_SYS_SEM_H)
+# include /**/ <sys/sem.h>
+# endif /* !ACE_LACKS_SYS_SEM_H */
+
+# if defined (ACE_LACKS_SEMBUF_T)
+struct sembuf
+{
+ unsigned short sem_num; // semaphore #
+ short sem_op; // semaphore operation
+ short sem_flg; // operation flags
+};
+# endif /* ACE_LACKS_SEMBUF_T */
+
+# if !defined (GETVAL)
+# define GETVAL 0
+# endif /* GETVAL */
+
+# if !defined (F_GETFL)
+# define F_GETFL 0
+# endif /* F_GETFL */
+
+# if !defined (SETVAL)
+# define SETVAL 0
+# endif /* SETVAL */
+
+# if !defined (GETALL)
+# define GETALL 0
+# endif /* GETALL */
+
+# if !defined (SETALL)
+# define SETALL 0
+# endif /* SETALL */
+
+# if !defined (SEM_UNDO)
+# define SEM_UNDO 0
+# endif /* SEM_UNDO */
+
+# if !defined (ACE_HAS_SEMUN) || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED))
+union semun
+{
+ int val; // value for SETVAL
+ struct semid_ds *buf; // buffer for IPC_STAT & IPC_SET
+ u_short *array; // array for GETALL & SETALL
+};
+# endif /* !ACE_HAS_SEMUN || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED)) */
+
+#endif /* ACE_OS_INCLUDE_SYS_SEM_H */