4.104.114.84.95
Last change
on this file since 2ba508b was
2ba508b,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:54:35
|
2003-09-04 Joel Sherrill <joel@…>
- include/confdefs.h, include/rtems/config.h,
include/rtems/extension.h, include/rtems/fatal.h,
include/rtems/init.h, include/rtems/io.h, include/rtems/mptables.h,
include/rtems/sptables.h, include/rtems/sptables.h.in,
inline/rtems/extension.inl, macros/rtems/extension.inl, src/debug.c,
src/exinit.c, src/extension.c, src/extensioncreate.c,
src/extensiondelete.c, src/extensionident.c, src/fatal.c, src/io.c,
src/itronapi.c, src/posixapi.c, src/rtemsapi.c: URL for license
changed.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* |
---|
2 | * Extension Manager -- rtems_extension_delete |
---|
3 | * |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-2002. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.rtems.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems/system.h> |
---|
16 | #include <rtems/rtems/support.h> |
---|
17 | #include <rtems/score/object.h> |
---|
18 | #include <rtems/score/thread.h> |
---|
19 | #include <rtems/extension.h> |
---|
20 | |
---|
21 | /*PAGE |
---|
22 | * |
---|
23 | * rtems_extension_delete |
---|
24 | * |
---|
25 | * This directive allows a thread to delete a extension. |
---|
26 | * |
---|
27 | * Input parameters: |
---|
28 | * id - extension id |
---|
29 | * |
---|
30 | * Output parameters: |
---|
31 | * RTEMS_SUCCESSFUL - if successful |
---|
32 | * error code - if unsuccessful |
---|
33 | */ |
---|
34 | |
---|
35 | rtems_status_code rtems_extension_delete( |
---|
36 | Objects_Id id |
---|
37 | ) |
---|
38 | { |
---|
39 | Extension_Control *the_extension; |
---|
40 | Objects_Locations location; |
---|
41 | |
---|
42 | the_extension = _Extension_Get( id, &location ); |
---|
43 | switch ( location ) { |
---|
44 | case OBJECTS_ERROR: |
---|
45 | case OBJECTS_REMOTE: /* should never return this */ |
---|
46 | return RTEMS_INVALID_ID; |
---|
47 | case OBJECTS_LOCAL: |
---|
48 | _User_extensions_Remove_set( &the_extension->Extension ); |
---|
49 | _Objects_Close( &_Extension_Information, &the_extension->Object ); |
---|
50 | _Extension_Free( the_extension ); |
---|
51 | _Thread_Enable_dispatch(); |
---|
52 | return RTEMS_SUCCESSFUL; |
---|
53 | } |
---|
54 | |
---|
55 | return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.