1 | /* inline/objectmp.inl |
---|
2 | * |
---|
3 | * This include file contains the bodies of all inlined routines |
---|
4 | * which deal with global objects. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1999. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.OARcorp.com/rtems/license.html. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __INLINE_MP_OBJECTS_inl |
---|
17 | #define __INLINE_MP_OBJECTS_inl |
---|
18 | |
---|
19 | /*PAGE |
---|
20 | * |
---|
21 | * _Objects_MP_Allocate_global_object |
---|
22 | * |
---|
23 | * DESCRIPTION: |
---|
24 | * |
---|
25 | * This function allocates a Global Object control block. |
---|
26 | */ |
---|
27 | |
---|
28 | RTEMS_INLINE_ROUTINE Objects_MP_Control *_Objects_MP_Allocate_global_object ( |
---|
29 | void |
---|
30 | ) |
---|
31 | { |
---|
32 | return (Objects_MP_Control *) |
---|
33 | _Chain_Get( &_Objects_MP_Inactive_global_objects ); |
---|
34 | } |
---|
35 | |
---|
36 | /*PAGE |
---|
37 | * |
---|
38 | * _Objects_MP_Free_global_object |
---|
39 | * |
---|
40 | * DESCRIPTION: |
---|
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 | /*PAGE |
---|
56 | * |
---|
57 | * _Objects_MP_Is_null_global_object |
---|
58 | * |
---|
59 | * DESCRIPTION: |
---|
60 | * |
---|
61 | * This function returns whether the global object is NULL or not. |
---|
62 | */ |
---|
63 | |
---|
64 | RTEMS_INLINE_ROUTINE boolean _Objects_MP_Is_null_global_object ( |
---|
65 | Objects_MP_Control *the_object |
---|
66 | ) |
---|
67 | { |
---|
68 | return( the_object == NULL ); |
---|
69 | } |
---|
70 | |
---|
71 | #endif |
---|
72 | /* end of include file */ |
---|