source: rtems/cpukit/sapi/inline/rtems/extension.inl @ b96254f

4.104.114.84.95
Last change on this file since b96254f was b96254f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/21/04 at 07:42:11

Add doxygen preamble.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 *  @file rtems/extension.inl
3 *
4 *  This file contains the static inline implementation of the inlined routines
5 *  from the Extension Manager.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef __EXTENSION_MANAGER_inl
20#define __EXTENSION_MANAGER_inl
21
22/*PAGE
23 *
24 *  _Extension_Allocate
25 *
26 *  DESCRIPTION:
27 *
28 *  This function allocates a extension control block from
29 *  the inactive chain of free extension control blocks.
30 */
31
32RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
33{
34  return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
35}
36
37/*PAGE
38 *
39 *  _Extension_Free
40 *
41 *  DESCRIPTION:
42 *
43 *  This routine frees a extension control block to the
44 *  inactive chain of free extension control blocks.
45 */
46
47RTEMS_INLINE_ROUTINE void _Extension_Free (
48  Extension_Control *the_extension
49)
50{
51  _Objects_Free( &_Extension_Information, &the_extension->Object );
52}
53
54/*PAGE
55 *
56 *  _Extension_Get
57 *
58 *  DESCRIPTION:
59 *
60 *  This function maps extension IDs to extension control blocks.
61 *  If ID corresponds to a local extension, then it returns
62 *  the extension control pointer which maps to ID and location
63 *  is set to OBJECTS_LOCAL.  Otherwise, location is set
64 *  to OBJECTS_ERROR and the returned value is undefined.
65 */
66
67RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get (
68  Objects_Id         id,
69  Objects_Locations *location
70)
71{
72  return (Extension_Control *)
73    _Objects_Get( &_Extension_Information, id, location );
74}
75
76/*PAGE
77 *
78 *  _Extension_Is_null
79 *
80 *  DESCRIPTION:
81 *
82 *  This function returns TRUE if the_extension is NULL and FALSE otherwise.
83 */
84
85RTEMS_INLINE_ROUTINE boolean _Extension_Is_null (
86  Extension_Control *the_extension
87)
88{
89  return ( the_extension == NULL );
90}
91
92#endif
93/* end of include file */
Note: See TracBrowser for help on using the repository browser.