1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup ClassicUserExtensions |
---|
5 | * |
---|
6 | * @brief User Extensions API |
---|
7 | */ |
---|
8 | |
---|
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 | |
---|
34 | /** |
---|
35 | * @brief Initialize extension manager. |
---|
36 | * |
---|
37 | * This routine initializes all extension manager related data structures. |
---|
38 | */ |
---|
39 | void _Extension_Manager_initialization(void); |
---|
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 | |
---|
53 | RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( |
---|
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 */ |
---|