source: rtems/cpukit/include/rtems/extensionimpl.h @ 5fc855d

5
Last change on this file since 5fc855d was 5fc855d, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 8, 2018 at 12:17:37 PM

rtems: Move internal structures to extensiondata.h

Update #3598.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicUserExtensionsImpl
5 *
6 * @brief Classic User Extensions Implementation
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.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_EXTENSIONIMPL_H
19#define _RTEMS_EXTENSIONIMPL_H
20
21#include <rtems/extensiondata.h>
22#include <rtems/score/objectimpl.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 * @defgroup ClassicUserExtensionsImpl User Extensions Implementation
30 *
31 * @ingroup ClassicUserExtensions
32 *
33 * @{
34 */
35
36extern Objects_Information  _Extension_Information;
37
38RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
39{
40  return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
41}
42
43RTEMS_INLINE_ROUTINE void _Extension_Free (
44  Extension_Control *the_extension
45)
46{
47  _Objects_Free( &_Extension_Information, &the_extension->Object );
48}
49
50RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get( Objects_Id id )
51{
52  return (Extension_Control *)
53    _Objects_Get_no_protection( id, &_Extension_Information );
54}
55
56/** @} */ 
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif
63/* end of include file */
Note: See TracBrowser for help on using the repository browser.