Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / os_include / sys / os_sem.h
blob926092b7d06ce982175c4115361b6fb5a3d367b5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file os_sem.h
7 * XSI semaphore facility
9 * $Id: os_sem.h 80826 2008-03-04 14:51:23Z wotte $
11 * @author Don Hinton <dhinton@dresystems.com>
12 * @author This code was originally in various places including ace/OS.h.
14 //=============================================================================
16 #ifndef ACE_OS_INCLUDE_SYS_OS_SEM_H
17 #define ACE_OS_INCLUDE_SYS_OS_SEM_H
19 #include /**/ "ace/pre.h"
21 #include "ace/config-lite.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 # pragma once
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
27 #include "ace/os_include/sys/os_ipc.h"
29 #if !defined (ACE_LACKS_SYS_SEM_H)
30 # include /**/ <sys/sem.h>
31 #endif /* !ACE_LACKS_SYS_SEM_H */
33 // Place all additions (especially function declarations) within extern "C" {}
34 #ifdef __cplusplus
35 extern "C"
37 #endif /* __cplusplus */
39 # if !defined (GETVAL)
40 # define GETVAL 0
41 # endif /* GETVAL */
43 # if !defined (SETVAL)
44 # define SETVAL 0
45 # endif /* SETVAL */
47 # if !defined (GETALL)
48 # define GETALL 0
49 # endif /* GETALL */
51 # if !defined (SETALL)
52 # define SETALL 0
53 # endif /* SETALL */
55 # if !defined (SEM_UNDO)
56 # define SEM_UNDO 0
57 # endif /* SEM_UNDO */
59 #if defined (ACE_LACKS_SEMBUF_T)
60 struct sembuf
62 /// semaphore #
63 unsigned short sem_num;
65 /// semaphore operation
66 short sem_op;
68 /// operation flags
69 short sem_flg;
71 #endif /* ACE_LACKS_SEMBUF_T */
73 #if !defined (ACE_HAS_SEMUN) || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED))
74 union semun
76 /// value for SETVAL
77 int val;
78 /// buffer for IPC_STAT & IPC_SET
79 struct semid_ds *buf;
80 /// array for GETALL & SETALL
81 u_short *array;
83 #endif /* !ACE_HAS_SEMUN || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED)) */
85 #ifdef __cplusplus
87 #endif /* __cplusplus */
89 #include /**/ "ace/post.h"
90 #endif /* ACE_OS_INCLUDE_SYS_OS_SEM_H */