RTEMS CPU Kit with SuperCore  4.11.3
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 <semaphore.h>
23 #include <rtems/score/object.h>
24 #include <rtems/score/coresem.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
39 /*
40  * Data Structure used to manage a POSIX semaphore
41  */
42 
43 typedef struct {
44  Objects_Control Object;
45  int process_shared;
46  bool named;
47  bool linked;
48  uint32_t open_count;
49  CORE_semaphore_Control Semaphore;
50  /*
51  * sem_t is 32-bit. If Object_Id is 16-bit, then they are not
52  * interchangeable. We have to be able to return a pointer to
53  * a 32-bit form of the 16-bit Id.
54  */
55  #if defined(RTEMS_USE_16_BIT_OBJECT)
56  sem_t Semaphore_id;
57  #endif
59 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif
67 /* end of include file */
Constants and Structures Associated with the Object Handler.
The following defines the Object Control Block used to manage each object local to this node...
Definition: object.h:232
The following defines the control block used to manage each counting semaphore.
Definition: coresem.h:69
Definition: semaphore.h:43
Private Support Information for POSIX Semaphores.
Data Associated with the Counting Semaphore Handler.