1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Semaphore Manager Initialization |
---|
5 | * @ingroup ClassicSem |
---|
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/system.h> |
---|
22 | #include <rtems/config.h> |
---|
23 | #include <rtems/sysinit.h> |
---|
24 | #include <rtems/rtems/status.h> |
---|
25 | #include <rtems/rtems/support.h> |
---|
26 | #include <rtems/rtems/attrimpl.h> |
---|
27 | #include <rtems/rtems/options.h> |
---|
28 | #include <rtems/rtems/semimpl.h> |
---|
29 | |
---|
30 | Objects_Information _Semaphore_Information; |
---|
31 | |
---|
32 | static void _Semaphore_Manager_initialization(void) |
---|
33 | { |
---|
34 | _Objects_Initialize_information( |
---|
35 | &_Semaphore_Information, /* object information table */ |
---|
36 | OBJECTS_CLASSIC_API, /* object API */ |
---|
37 | OBJECTS_RTEMS_SEMAPHORES, /* object class */ |
---|
38 | Configuration_RTEMS_API.maximum_semaphores, |
---|
39 | /* maximum objects of this class */ |
---|
40 | sizeof( Semaphore_Control ), /* size of this object's control block */ |
---|
41 | false, /* true if the name is a string */ |
---|
42 | RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ |
---|
43 | #if defined(RTEMS_MULTIPROCESSING) |
---|
44 | , |
---|
45 | true, /* true if this is a global object class */ |
---|
46 | _Semaphore_MP_Send_extract_proxy /* Proxy extraction support callout */ |
---|
47 | #endif |
---|
48 | ); |
---|
49 | |
---|
50 | /* |
---|
51 | * Register the MP Process Packet routine. |
---|
52 | */ |
---|
53 | |
---|
54 | #if defined(RTEMS_MULTIPROCESSING) |
---|
55 | _MPCI_Register_packet_processor( |
---|
56 | MP_PACKET_SEMAPHORE, |
---|
57 | _Semaphore_MP_Process_packet |
---|
58 | ); |
---|
59 | #endif |
---|
60 | |
---|
61 | } |
---|
62 | |
---|
63 | RTEMS_SYSINIT_ITEM( |
---|
64 | _Semaphore_Manager_initialization, |
---|
65 | RTEMS_SYSINIT_CLASSIC_SEMAPHORE, |
---|
66 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
67 | ); |
---|