1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief POSIX Function Initializes Semaphore Manager |
---|
5 | * @ingroup POSIXAPI |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2008. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/posix/semaphoreimpl.h> |
---|
22 | #include <rtems/config.h> |
---|
23 | #include <rtems/sysinit.h> |
---|
24 | |
---|
25 | #include <limits.h> |
---|
26 | |
---|
27 | Objects_Information _POSIX_Semaphore_Information; |
---|
28 | |
---|
29 | /* |
---|
30 | * _POSIX_Semaphore_Manager_initialization |
---|
31 | * |
---|
32 | * This routine initializes all semaphore manager related data structures. |
---|
33 | * |
---|
34 | * Input parameters: NONE |
---|
35 | * |
---|
36 | * Output parameters: NONE |
---|
37 | */ |
---|
38 | |
---|
39 | static void _POSIX_Semaphore_Manager_initialization(void) |
---|
40 | { |
---|
41 | _Objects_Initialize_information( |
---|
42 | &_POSIX_Semaphore_Information, /* object information table */ |
---|
43 | OBJECTS_POSIX_API, /* object API */ |
---|
44 | OBJECTS_POSIX_SEMAPHORES, /* object class */ |
---|
45 | _Configuration_POSIX_Maximum_named_semaphores, |
---|
46 | sizeof( POSIX_Semaphore_Control ), |
---|
47 | /* size of this object's control block */ |
---|
48 | true, /* true if names for this object are strings */ |
---|
49 | _POSIX_PATH_MAX, /* maximum length of each object's name */ |
---|
50 | NULL /* Proxy extraction support callout */ |
---|
51 | ); |
---|
52 | } |
---|
53 | |
---|
54 | RTEMS_SYSINIT_ITEM( |
---|
55 | _POSIX_Semaphore_Manager_initialization, |
---|
56 | RTEMS_SYSINIT_POSIX_SEMAPHORE, |
---|
57 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
58 | ); |
---|