source: rtems/cpukit/sapi/src/extensiondelete.c @ 28352fae

4.104.115
Last change on this file since 28352fae was 28352fae, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/29/09 at 13:51:53

Whitespace removal.

  • 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 *  $Id$
18 */
19
20#if HAVE_CONFIG_H
21#include "config.h"
22#endif
23
24#include <rtems/system.h>
25#include <rtems/rtems/support.h>
26#include <rtems/score/object.h>
27#include <rtems/score/thread.h>
28#include <rtems/extension.h>
29
30rtems_status_code rtems_extension_delete(
31  rtems_id id
32)
33{
34  Extension_Control   *the_extension;
35  Objects_Locations    location;
36
37  the_extension = _Extension_Get( id, &location );
38  switch ( location ) {
39    case OBJECTS_LOCAL:
40      _User_extensions_Remove_set( &the_extension->Extension );
41      _Objects_Close( &_Extension_Information, &the_extension->Object );
42      _Extension_Free( the_extension );
43      _Thread_Enable_dispatch();
44      return RTEMS_SUCCESSFUL;
45
46#if defined(RTEMS_MULTIPROCESSING)
47    case OBJECTS_REMOTE:            /* should never return this */
48#endif
49    case OBJECTS_ERROR:
50      break;
51  }
52
53  return RTEMS_INVALID_ID;
54}
Note: See TracBrowser for help on using the repository browser.