RTEMS CPU Kit with SuperCore  4.11.3
extensionimpl.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-1999.
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_EXTENSIONIMPL_H
19 #define _RTEMS_EXTENSIONIMPL_H
20 
21 #include <rtems/extension.h>
22 #include <rtems/score/objectimpl.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #ifndef SAPI_EXT_EXTERN
29 #define SAPI_EXT_EXTERN extern
30 #endif
31 
32 SAPI_EXT_EXTERN Objects_Information _Extension_Information;
33 
40 
41 RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
42 {
43  return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
44 }
45 
46 RTEMS_INLINE_ROUTINE void _Extension_Free (
47  Extension_Control *the_extension
48 )
49 {
50  _Objects_Free( &_Extension_Information, &the_extension->Object );
51 }
52 
54  Objects_Id id,
55  Objects_Locations *location
56 )
57 {
58  return (Extension_Control *)
59  _Objects_Get( &_Extension_Information, id, location );
60 }
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif
67 /* end of include file */
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
The following defines the structure for the information used to manage each class of objects...
Definition: objectimpl.h:136
User Extensions API.
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
Definition: extension.h:28
Inlined Routines in the Object Handler.
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
void _Extension_Manager_initialization(void)
Initialize extension manager.
Definition: extension.c:30