RTEMS
extensiondelete.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2007.
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 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
22 #include <rtems/extensionimpl.h>
24 
26  rtems_id id
27 )
28 {
29  rtems_status_code status;
30  Extension_Control *the_extension;
31 
33 
34  the_extension = _Extension_Get( id );
35 
36  if ( the_extension != NULL ) {
37  _Objects_Close( &_Extension_Information, &the_extension->Object );
38  _User_extensions_Remove_set( &the_extension->Extension );
39  _Extension_Free( the_extension );
40  status = RTEMS_SUCCESSFUL;
41  } else {
42  status = RTEMS_INVALID_ID;
43  }
44 
46  return status;
47 }
static __inline__ void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition: objectimpl.h:846
User Extension Handler API.
static __inline__ void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:834
This status code indicates successful completion.
Definition: status.h:86
Classic User Extensions Implementation.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
void _User_extensions_Remove_set(User_extensions_Control *extension)
Removes a user extension.
rtems_status_code rtems_extension_delete(rtems_id id)
%
This status code indicates that an object identifier was invalid.
Definition: status.h:106
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Closes object.
Definition: objectclose.c:23
Objects_Information _Extension_Information
The Classic Extensions objects information.
Definition: extension.c:47