blob: 51258fa4a4c2068ebe0d00c7315435d49f9562e0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/**
* @file
*
* @ingroup ScoreObject
*
* @brief Object Handler Data Structures
*/
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifndef _RTEMS_SCORE_OBJECTDATA_H
#define _RTEMS_SCORE_OBJECTDATA_H
#include <rtems/score/object.h>
#include <rtems/score/chain.h>
#include <rtems/score/rbtree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup ScoreObject
*
* @{
*/
/**
* The following defines the Object Control Block used to manage
* each object local to this node.
*/
typedef struct {
/** This is the chain node portion of an object. */
Chain_Node Node;
/** This is the object's ID. */
Objects_Id id;
/** This is the object's name. */
Objects_Name name;
} Objects_Control;
#if defined( RTEMS_MULTIPROCESSING )
/**
* @brief This defines the Global Object Control Block used to manage objects
* resident on other nodes.
*/
typedef struct {
/**
* @brief Nodes to manage active and inactive global objects.
*/
union {
/**
* @brief Inactive global objects reside on a chain.
*/
Chain_Node Inactive;
struct {
/**
* @brief Node to lookup an active global object by identifier.
*/
RBTree_Node Id_lookup;
/**
* @brief Node to lookup an active global object by name.
*/
RBTree_Node Name_lookup;
} Active;
} Nodes;
/**
* @brief The global object identifier.
*/
Objects_Id id;
/**
* @brief The global object name.
*
* Using an unsigned thirty two bit value is broken but works. If any API is
* MP with variable length names .. BOOM!!!!
*/
uint32_t name;
} Objects_MP_Control;
#endif
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */
|