OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [sapi/] [inline/] [rtems/] [extension.inl] - Blame information for rev 296

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: extension.inl,v 1.2 2001-09-27 11:59:20 chris Exp $
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
 
29
RTEMS_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
 
44
RTEMS_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
 
64
RTEMS_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
 
82
RTEMS_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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.