RTEMS: cpukit/include/rtems/posix/semaphore.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
28extern "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;
49} POSIX_Semaphore_Control;
50
54extern Objects_Information _POSIX_Semaphore_Information;
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 */
_POSIX_Semaphore_Information
Objects_Information _POSIX_Semaphore_Information
The POSIX Semaphore objects information.
objectdata.h
Object Handler Data Structures.
semaphore.h
Private Support Information for POSIX Semaphores.
Objects_Control
Definition: objectdata.h:39
Objects_Information
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
POSIX_Semaphore_Control
Definition: semaphore.h:44