source: rtems/cpukit/include/rtems/score/objectdata.h @ 0f5b2c09

5
Last change on this file since 0f5b2c09 was a6e7d5e4, checked in by Sebastian Huber <sebastian.huber@…>, on 11/12/18 at 08:00:36

score: Move internal structures to objectdata.h

Update #3598.

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