1 | /* |
---|
2 | * Barrier Manager |
---|
3 | * |
---|
4 | * DESCRIPTION: |
---|
5 | * |
---|
6 | * This package is the implementation of the Barrier Manager. |
---|
7 | * |
---|
8 | * Directives provided are: |
---|
9 | * |
---|
10 | * + create a barrier |
---|
11 | * + get an ID of a barrier |
---|
12 | * + delete a barrier |
---|
13 | * + acquire a barrier |
---|
14 | * + release a barrier |
---|
15 | * |
---|
16 | * COPYRIGHT (c) 1989-2006. |
---|
17 | * On-Line Applications Research Corporation (OAR). |
---|
18 | * |
---|
19 | * The license and distribution terms for this file may be |
---|
20 | * found in the file LICENSE in this distribution or at |
---|
21 | * http://www.rtems.com/license/LICENSE. |
---|
22 | * |
---|
23 | * $Id$ |
---|
24 | */ |
---|
25 | |
---|
26 | #if HAVE_CONFIG_H |
---|
27 | #include "config.h" |
---|
28 | #endif |
---|
29 | |
---|
30 | #include <rtems/system.h> |
---|
31 | #include <rtems/rtems/status.h> |
---|
32 | #include <rtems/rtems/support.h> |
---|
33 | #include <rtems/score/object.h> |
---|
34 | #include <rtems/rtems/barrier.h> |
---|
35 | #if defined(RTEMS_MULTIPROCESSING) |
---|
36 | #include <rtems/score/mpci.h> |
---|
37 | #endif |
---|
38 | |
---|
39 | /** |
---|
40 | * @brief _Barrier_Manager_initialization |
---|
41 | * |
---|
42 | * Input parameters: |
---|
43 | * maximum_barriers - maximum configured barriers |
---|
44 | * |
---|
45 | * Output parameters: NONE |
---|
46 | */ |
---|
47 | |
---|
48 | void _Barrier_Manager_initialization( |
---|
49 | uint32_t maximum_barriers |
---|
50 | ) |
---|
51 | { |
---|
52 | _Objects_Initialize_information( |
---|
53 | &_Barrier_Information, /* object information table */ |
---|
54 | OBJECTS_CLASSIC_API, /* object API */ |
---|
55 | OBJECTS_RTEMS_BARRIERS, /* object class */ |
---|
56 | maximum_barriers, /* maximum objects of this class */ |
---|
57 | sizeof( Barrier_Control ), /* size of this object's control block */ |
---|
58 | FALSE, /* TRUE if the name is a string */ |
---|
59 | RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ |
---|
60 | #if defined(RTEMS_MULTIPROCESSING) |
---|
61 | , |
---|
62 | FALSE, /* TRUE if this is a global object class */ |
---|
63 | NULL /* Proxy extraction support callout */ |
---|
64 | #endif |
---|
65 | ); |
---|
66 | } |
---|