5
Last change
on this file since 36272279 was
36272279,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/08/16 at 14:23:22
|
sapi: Avoid Giant lock for extensions
Extension create and delete is protected by the object allocator lock.
Update #2555.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
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 | extern Objects_Information _Extension_Information; |
---|
29 | |
---|
30 | RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) |
---|
31 | { |
---|
32 | return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); |
---|
33 | } |
---|
34 | |
---|
35 | RTEMS_INLINE_ROUTINE void _Extension_Free ( |
---|
36 | Extension_Control *the_extension |
---|
37 | ) |
---|
38 | { |
---|
39 | _Objects_Free( &_Extension_Information, &the_extension->Object ); |
---|
40 | } |
---|
41 | |
---|
42 | RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get( Objects_Id id ) |
---|
43 | { |
---|
44 | return (Extension_Control *) |
---|
45 | _Objects_Get_no_protection( &_Extension_Information, id ); |
---|
46 | } |
---|
47 | |
---|
48 | #ifdef __cplusplus |
---|
49 | } |
---|
50 | #endif |
---|
51 | |
---|
52 | #endif |
---|
53 | /* end of include file */ |
---|
Note: See
TracBrowser
for help on using the repository browser.