1 | /* |
---|
2 | * Object Handler |
---|
3 | * |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-2008. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.rtems.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #if HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/system.h> |
---|
20 | #include <rtems/config.h> |
---|
21 | #include <rtems/score/address.h> |
---|
22 | #include <rtems/score/chain.h> |
---|
23 | #include <rtems/score/object.h> |
---|
24 | #if defined(RTEMS_MULTIPROCESSING) |
---|
25 | #include <rtems/score/objectmp.h> |
---|
26 | #endif |
---|
27 | #include <rtems/score/thread.h> |
---|
28 | #include <rtems/score/wkspace.h> |
---|
29 | #include <rtems/score/sysstate.h> |
---|
30 | #include <rtems/score/isr.h> |
---|
31 | |
---|
32 | /*PAGE |
---|
33 | * |
---|
34 | * _Objects_Handler_initialization |
---|
35 | * |
---|
36 | * This routine initializes the object handler. |
---|
37 | * |
---|
38 | * Input parameters: NONE |
---|
39 | * |
---|
40 | * Output parameters: NONE |
---|
41 | */ |
---|
42 | |
---|
43 | void _Objects_Handler_initialization(void) |
---|
44 | { |
---|
45 | #if defined(RTEMS_MULTIPROCESSING) |
---|
46 | uint32_t node; |
---|
47 | uint32_t maximum_nodes; |
---|
48 | uint32_t maximum_global_objects; |
---|
49 | |
---|
50 | node = _Configuration_MP_table->node; |
---|
51 | maximum_nodes = _Configuration_MP_table->maximum_nodes; |
---|
52 | maximum_global_objects = _Configuration_MP_table->maximum_global_objects; |
---|
53 | |
---|
54 | if ( node < 1 || node > maximum_nodes ) |
---|
55 | _Internal_error_Occurred( |
---|
56 | INTERNAL_ERROR_CORE, |
---|
57 | TRUE, |
---|
58 | INTERNAL_ERROR_INVALID_NODE |
---|
59 | ); |
---|
60 | |
---|
61 | _Objects_Local_node = node; |
---|
62 | _Objects_Maximum_nodes = maximum_nodes; |
---|
63 | |
---|
64 | _Objects_MP_Handler_initialization( |
---|
65 | node, |
---|
66 | maximum_nodes, |
---|
67 | maximum_global_objects |
---|
68 | ); |
---|
69 | #endif |
---|
70 | } |
---|