5
Last change
on this file since c090db7 was
c090db7,
checked in by Sebastian Huber <sebastian.huber@…>, on 09/12/17 at 06:09:16
|
posix: Implement self-contained POSIX semaphores
For semaphore object pointer and object validation see
POSIX_SEMAPHORE_VALIDATE_OBJECT().
Destruction or close of a busy semaphore returns an error status. The
object is not flushed.
POSIX semaphores are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3116.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Private Support Information for POSIX Semaphores |
---|
5 | * |
---|
6 | * This include file contains all the private support information for |
---|
7 | * POSIX Semaphores. |
---|
8 | */ |
---|
9 | |
---|
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 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | /** |
---|
30 | * @defgroup POSIXSemaphorePrivate POSIX Semaphore Private Support |
---|
31 | * |
---|
32 | * @ingroup POSIXAPI |
---|
33 | * |
---|
34 | * This defines the internal implementation support for POSIX semaphores. |
---|
35 | */ |
---|
36 | /**@{*/ |
---|
37 | |
---|
38 | /* |
---|
39 | * Data Structure used to manage a POSIX semaphore |
---|
40 | */ |
---|
41 | |
---|
42 | typedef struct { |
---|
43 | Objects_Control Object; |
---|
44 | sem_t Semaphore; |
---|
45 | bool linked; |
---|
46 | uint32_t open_count; |
---|
47 | } POSIX_Semaphore_Control; |
---|
48 | |
---|
49 | /** @} */ |
---|
50 | |
---|
51 | #ifdef __cplusplus |
---|
52 | } |
---|
53 | #endif |
---|
54 | |
---|
55 | #endif |
---|
56 | /* end of include file */ |
---|
Note: See
TracBrowser
for help on using the repository browser.