source: rtems/cpukit/sapi/include/rtems/extensionimpl.h @ a2e3f33

4.115
Last change on this file since a2e3f33 was a2e3f33, checked in by Sebastian Huber <sebastian.huber@…>, on 07/24/13 at 11:50:54

score: Create object implementation header

Move implementation specific parts of object.h and object.inl into new
header file objectimpl.h. The object.h contains now only the
application visible API.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicUserExtensions
5 *
6 * @brief User Extensions API
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-1999.
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#ifndef _RTEMS_EXTENSIONIMPL_H
19#define _RTEMS_EXTENSIONIMPL_H
20
21#include <rtems/extension.h>
22#include <rtems/score/objectimpl.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifndef SAPI_EXT_EXTERN
29#define SAPI_EXT_EXTERN extern
30#endif
31
32SAPI_EXT_EXTERN Objects_Information  _Extension_Information;
33
34/**
35 *  @brief Initialize extension manager.
36 *
37 *  This routine initializes all extension manager related data structures.
38 */
39void _Extension_Manager_initialization(void);
40
41RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
42{
43  return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
44}
45
46RTEMS_INLINE_ROUTINE void _Extension_Free (
47  Extension_Control *the_extension
48)
49{
50  _Objects_Free( &_Extension_Information, &the_extension->Object );
51}
52
53RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get (
54  Objects_Id         id,
55  Objects_Locations *location
56)
57{
58  return (Extension_Control *)
59    _Objects_Get( &_Extension_Information, id, location );
60}
61
62RTEMS_INLINE_ROUTINE bool _Extension_Is_null (
63  Extension_Control *the_extension
64)
65{
66  return ( the_extension == NULL );
67}
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif
74/* end of include file */
Note: See TracBrowser for help on using the repository browser.