source:
rtems/cpukit/sapi/src/extensiondelete.c
@
10e348ab
Last change on this file since 10e348ab was 10e348ab, checked in by Sebastian Huber <sebastian.huber@…>, on 04/23/13 at 07:46:29 | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[c42d1a4] | 1 | /** |
2 | * @file | |
3 | * | |
4 | * @ingroup ClassicUserExtensions | |
[ac97074f] | 5 | * |
[c42d1a4] | 6 | * @brief User Extensions Implementation. |
7 | */ | |
[28352fae] | 8 | |
[c42d1a4] | 9 | /* |
[0e87deaa] | 10 | * COPYRIGHT (c) 1989-2007. |
[ac97074f] | 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 | |
[2ba508b] | 15 | * http://www.rtems.com/license/LICENSE. |
[ac97074f] | 16 | */ |
17 | ||
[16351f7a] | 18 | #if HAVE_CONFIG_H |
19 | #include "config.h" | |
20 | #endif | |
21 | ||
[10e348ab] | 22 | #include <rtems/extension.h> |
[ac97074f] | 23 | #include <rtems/score/object.h> |
24 | #include <rtems/score/thread.h> | |
[10e348ab] | 25 | #include <rtems/score/userextimpl.h> |
[ac97074f] | 26 | |
27 | rtems_status_code rtems_extension_delete( | |
[c42d1a4] | 28 | rtems_id id |
[ac97074f] | 29 | ) |
30 | { | |
31 | Extension_Control *the_extension; | |
32 | Objects_Locations location; | |
33 | ||
34 | the_extension = _Extension_Get( id, &location ); | |
35 | switch ( location ) { | |
36 | case OBJECTS_LOCAL: | |
37 | _User_extensions_Remove_set( &the_extension->Extension ); | |
38 | _Objects_Close( &_Extension_Information, &the_extension->Object ); | |
39 | _Extension_Free( the_extension ); | |
40 | _Thread_Enable_dispatch(); | |
41 | return RTEMS_SUCCESSFUL; | |
[30cd5393] | 42 | |
43 | #if defined(RTEMS_MULTIPROCESSING) | |
44 | case OBJECTS_REMOTE: /* should never return this */ | |
45 | #endif | |
46 | case OBJECTS_ERROR: | |
47 | break; | |
[ac97074f] | 48 | } |
49 | ||
[30cd5393] | 50 | return RTEMS_INVALID_ID; |
[ac97074f] | 51 | } |
Note: See TracBrowser
for help on using the repository browser.