mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-27 16:54:41 +08:00
* sapi/include/rtems/extension.h, sapi/src/extensiondelete.c, sapi/src/extensionident.c, sapi/src/extensioncreate.c, sapi/inline/rtems/extension.inl, score/include/rtems/score/userext.h, score/src/userextthreaddelete.c, score/src/userext.c, score/src/userextthreadcreate.c, score/src/userextremoveset.c, score/src/userextthreadbegin.c, score/src/userextaddset.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c, score/src/userextthreadrestart.c: Documentation. The types User_extensions_routine and rtems_extension are now deprecated. Removed unused types User_extensions_thread_post_switch_extension and rtems_task_post_switch_extension. Renamed _User_extensions_Add_API_set() in _User_extensions_Add_set(). Renamed _User_extensions_Add_set() in _User_extensions_Add_set_with_table(). * score/src/userextaddapiset.c: Removed file. * score/Makefile.am: Update.
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
/**
|
|
* @file
|
|
*
|
|
* @ingroup ClassicUserExtensions
|
|
*
|
|
* @brief User Extensions Implementation.
|
|
*/
|
|
|
|
/*
|
|
* COPYRIGHT (c) 1989-2007.
|
|
* On-Line Applications Research Corporation (OAR).
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.com/license/LICENSE.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#if HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <rtems/system.h>
|
|
#include <rtems/rtems/support.h>
|
|
#include <rtems/score/object.h>
|
|
#include <rtems/score/thread.h>
|
|
#include <rtems/extension.h>
|
|
|
|
rtems_status_code rtems_extension_delete(
|
|
rtems_id id
|
|
)
|
|
{
|
|
Extension_Control *the_extension;
|
|
Objects_Locations location;
|
|
|
|
the_extension = _Extension_Get( id, &location );
|
|
switch ( location ) {
|
|
case OBJECTS_LOCAL:
|
|
_User_extensions_Remove_set( &the_extension->Extension );
|
|
_Objects_Close( &_Extension_Information, &the_extension->Object );
|
|
_Extension_Free( the_extension );
|
|
_Thread_Enable_dispatch();
|
|
return RTEMS_SUCCESSFUL;
|
|
|
|
#if defined(RTEMS_MULTIPROCESSING)
|
|
case OBJECTS_REMOTE: /* should never return this */
|
|
#endif
|
|
case OBJECTS_ERROR:
|
|
break;
|
|
}
|
|
|
|
return RTEMS_INVALID_ID;
|
|
}
|