source: rtems/cpukit/score/macros/rtems/score/object.inl @ 7f6a24ab

4.104.114.84.95
Last change on this file since 7f6a24ab was 7f6a24ab, checked in by Joel Sherrill <joel.sherrill@…>, on 08/28/95 at 15:30:29

Added unused priority ceiling parameter to rtems_semaphore_create.

Rearranged code to created thread handler routines to initialize,
start, restart, and "close/delete" a thread.

Made internal threads their own object class. This now uses the
thread support routines for starting and initializing a thread.

Insured deleted tasks are freed to the Inactive pool associated with the
correct Information block.

Added an RTEMS API specific data area to the thread control block.

Beginnings of removing the word "rtems" from the core.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*  object.inl
2 *
3 *  This include file contains the macro implementation of all
4 *  of the inlined routines in the Object Handler.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __OBJECTS_inl
18#define __OBJECTS_inl
19
20/*PAGE
21 *
22 *  _Objects_Build_id
23 *
24 */
25
26#define _Objects_Build_id( _the_class, _node, _index ) \
27  ( ((_the_class) << OBJECTS_CLASS_START_BIT) | \
28    ((_node) << OBJECTS_NODE_START_BIT)       | \
29    ((_index) << OBJECTS_INDEX_START_BIT) )
30
31/*PAGE
32 *
33 *  rtems_get_class
34 */
35 
36#define rtems_get_class( _id ) \
37  (Objects_Classes) \
38    (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS)
39
40/*PAGE
41 *
42 *  rtems_get_node
43 *
44 */
45
46#define rtems_get_node( _id ) \
47  (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS)
48
49/*PAGE
50 *
51 *  rtems_get_index
52 *
53 */
54
55#define rtems_get_index( _id ) \
56  (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS)
57
58/*PAGE
59 *
60 *  _Objects_Is_class_valid
61 *
62 */
63 
64#define _Objects_Is_class_valid( _the_class ) \
65  ( (_the_class) <= OBJECTS_CLASSES_LAST )
66
67/*PAGE
68 *
69 *  _Objects_Is_local_node
70 *
71 */
72
73#define _Objects_Is_local_node( _node ) \
74  ( (_node) == _Objects_Local_node )
75
76/*PAGE
77 *
78 *  _Objects_Is_local_id
79 *
80 */
81
82#define _Objects_Is_local_id( _id ) \
83  _Objects_Is_local_node( rtems_get_node(_id) )
84
85/*PAGE
86 *
87 *  _Objects_Are_ids_equal
88 *
89 */
90
91#define _Objects_Are_ids_equal( _left, _right ) \
92  ( (_left) == (_right) )
93
94/*PAGE
95 *
96 *  _Objects_Allocate
97 *
98 */
99
100#define _Objects_Allocate( _information )  \
101  (Objects_Control *) _Chain_Get( &(_information)->Inactive )
102
103/*PAGE
104 *
105 *  _Objects_Free
106 *
107 */
108
109#define _Objects_Free( _information, _the_object )  \
110  _Chain_Append( &(_information)->Inactive, &(_the_object)->Node )
111
112/*PAGE
113 *
114 *  _Objects_Open
115 *
116 */
117
118#define _Objects_Open( _information, _the_object, _name ) \
119  { \
120    unsigned32 _index; \
121    \
122    _index = rtems_get_index( (_the_object)->id ); \
123    (_information)->local_table[ _index ] = (_the_object); \
124    \
125    if ( (_information)->is_string ) \
126      _Objects_Copy_name_string( (_name), (_the_object)->name ); \
127    else \
128      _Objects_Copy_name_raw( \
129        (_name), (_the_object)->name, (_information)->name_length ); \
130  }
131
132/*PAGE
133 *
134 *  _Objects_Close
135 *
136 */
137
138#define _Objects_Close( _information, _the_object ) \
139  { \
140    unsigned32 _index; \
141    \
142    _index = rtems_get_index( (_the_object)->id ); \
143    (_information)->local_table[ _index ] = NULL; \
144    _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \
145  }
146
147#endif
148/* end of include file */
Note: See TracBrowser for help on using the repository browser.