source: rtems/cpukit/include/rtems/extensionimpl.h @ 21275b58

Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 22, 2018 at 6:14:51 PM

score: Static Objects_Information initialization

Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.

  • 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
36RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
37{
38  return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
39}
40
41RTEMS_INLINE_ROUTINE void _Extension_Free (
42  Extension_Control *the_extension
43)
44{
45  _Objects_Free( &_Extension_Information, &the_extension->Object );
46}
47
48RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get( Objects_Id id )
49{
50  return (Extension_Control *)
51    _Objects_Get_no_protection( id, &_Extension_Information );
52}
53
54/** @} */ 
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif
61/* end of include file */
Note: See TracBrowser for help on using the repository browser.