1 | /** |
---|
2 | * @file rtems/score/objectmp.inl |
---|
3 | * |
---|
4 | * This include file contains the bodies of all inlined routines |
---|
5 | * which deal with global objects. |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2004. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.com/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _RTEMS_SCORE_OBJECTMP_H |
---|
18 | # error "Never use <rtems/score/objectmp.inl> directly; include <rtems/score/objectmp.h> instead." |
---|
19 | #endif |
---|
20 | |
---|
21 | #ifndef _RTEMS_SCORE_OBJECTMP_INL |
---|
22 | #define _RTEMS_SCORE_OBJECTMP_INL |
---|
23 | |
---|
24 | /** |
---|
25 | * @addtogroup ScoreObjectMP |
---|
26 | * @{ |
---|
27 | */ |
---|
28 | |
---|
29 | /** |
---|
30 | * This function allocates a Global Object control block. |
---|
31 | */ |
---|
32 | |
---|
33 | RTEMS_INLINE_ROUTINE Objects_MP_Control *_Objects_MP_Allocate_global_object ( |
---|
34 | void |
---|
35 | ) |
---|
36 | { |
---|
37 | return (Objects_MP_Control *) |
---|
38 | _Chain_Get( &_Objects_MP_Inactive_global_objects ); |
---|
39 | } |
---|
40 | |
---|
41 | /** |
---|
42 | * This routine deallocates a Global Object control block. |
---|
43 | */ |
---|
44 | |
---|
45 | RTEMS_INLINE_ROUTINE void _Objects_MP_Free_global_object ( |
---|
46 | Objects_MP_Control *the_object |
---|
47 | ) |
---|
48 | { |
---|
49 | _Chain_Append( |
---|
50 | &_Objects_MP_Inactive_global_objects, |
---|
51 | &the_object->Object.Node |
---|
52 | ); |
---|
53 | } |
---|
54 | |
---|
55 | /** |
---|
56 | * This function returns whether the global object is NULL or not. |
---|
57 | */ |
---|
58 | |
---|
59 | RTEMS_INLINE_ROUTINE bool _Objects_MP_Is_null_global_object ( |
---|
60 | Objects_MP_Control *the_object |
---|
61 | ) |
---|
62 | { |
---|
63 | return( the_object == NULL ); |
---|
64 | } |
---|
65 | |
---|
66 | /**@}*/ |
---|
67 | |
---|
68 | #endif |
---|
69 | /* end of include file */ |
---|