Xenomai  3.1
sem.h
1 /*
2  * Written by Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18 #ifndef _COBALT_UAPI_SEM_H
19 #define _COBALT_UAPI_SEM_H
20 
21 #include <cobalt/uapi/kernel/types.h>
22 
23 #define COBALT_SEM_MAGIC (0x86860707)
24 #define COBALT_NAMED_SEM_MAGIC (0x86860D0D)
25 
26 struct cobalt_sem;
27 
28 struct cobalt_sem_state {
29  atomic_t value;
30  __u32 flags;
31 };
32 
33 union cobalt_sem_union {
34  sem_t native_sem;
35  struct cobalt_sem_shadow {
36  __u32 magic;
37  __s32 state_offset;
38  xnhandle_t handle;
39  } shadow_sem;
40 };
41 
42 struct cobalt_sem_info {
43  unsigned int value;
44  int flags;
45  int nrwait;
46 };
47 
48 #define SEM_FIFO 0x1
49 #define SEM_PULSE 0x2
50 #define SEM_PSHARED 0x4
51 #define SEM_REPORT 0x8
52 #define SEM_WARNDEL 0x10
53 #define SEM_RAWCLOCK 0x20
54 #define SEM_NOBUSYDEL 0x40
55 
56 #endif /* !_COBALT_UAPI_SEM_H */
Copyright © 2011 Gilles Chanteperdrix gilles.chanteperdrix@xenomai.org.
Definition: atomic.h:24