RTEMS  5.0.0
semaphore.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2011.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_POSIX_SEMAPHORE_H
20 #define _RTEMS_POSIX_SEMAPHORE_H
21 
22 #include <rtems/score/objectdata.h>
23 
24 #include <limits.h>
25 #include <semaphore.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
40 /*
41  * Data Structure used to manage a POSIX semaphore
42  */
43 
44 typedef struct {
45  Objects_Control Object;
46  sem_t Semaphore;
47  bool linked;
48  uint32_t open_count;
50 
55 
65 #define POSIX_SEMAPHORE_INFORMATION_DEFINE( max ) \
66  OBJECTS_INFORMATION_DEFINE( \
67  _POSIX_Semaphore, \
68  OBJECTS_POSIX_API, \
69  OBJECTS_POSIX_SEMAPHORES, \
70  POSIX_Semaphore_Control, \
71  max, \
72  _POSIX_PATH_MAX, \
73  NULL \
74  )
75 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
83 /* end of include file */
Definition: objectdata.h:39
Definition: semaphore.h:44
Object Handler Data Structures.
The information structure used to manage each API class of objects.
Definition: objectdata.h:160
Objects_Information _POSIX_Semaphore_Information
The POSIX Semaphore objects information.
Private Support Information for POSIX Semaphores.