source: rtems/cpukit/sapi/src/extensiondelete.c @ 10e348ab

4.115
Last change on this file since 10e348ab was 10e348ab, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 23, 2013 at 7:46:29 AM

sapi: Fix warnings

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicUserExtensions
5 *
6 * @brief User Extensions Implementation.
7 */
8
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.com/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/extension.h>
23#include <rtems/score/object.h>
24#include <rtems/score/thread.h>
25#include <rtems/score/userextimpl.h>
26
27rtems_status_code rtems_extension_delete(
28  rtems_id id
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;
42
43#if defined(RTEMS_MULTIPROCESSING)
44    case OBJECTS_REMOTE:            /* should never return this */
45#endif
46    case OBJECTS_ERROR:
47      break;
48  }
49
50  return RTEMS_INVALID_ID;
51}
Note: See TracBrowser for help on using the repository browser.