source: rtems/cpukit/sapi/inline/rtems/extension.inl @ 2ba508b

4.104.114.84.95
Last change on this file since 2ba508b was 2ba508b, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:54:35 PM

2003-09-04 Joel Sherrill <joel@…>

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