Changeset 21275b58 in rtems for cpukit/include/rtems/score


Ignore:
Timestamp:
Nov 22, 2018, 6:14:51 PM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6b0a729b
Parents:
0f5b2c09
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/18 18:14:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/14/18 06:03:29)
Message:

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.

Location:
cpukit/include/rtems/score
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/freechain.h

    r0f5b2c09 r21275b58  
    1818
    1919#include <rtems/score/basedefs.h>
    20 #include <rtems/score/chain.h>
     20#include <rtems/score/chainimpl.h>
    2121
    2222#ifdef __cplusplus
     
    5959 *
    6060 * @param[in] freechain The freechain control to initialize.
    61  * @param[in] allocator The allocator function.
     61 * @param[in] initial_nodes Array with the initial nodes.
    6262 * @param[in] number_nodes The initial number of nodes.
    6363 * @param[in] node_size The node size.
    6464 */
    65 void _Freechain_Initialize(
     65RTEMS_INLINE_ROUTINE void _Freechain_Initialize(
    6666  Freechain_Control   *freechain,
    67   Freechain_Allocator  allocator,
     67  void                *initial_nodes,
    6868  size_t               number_nodes,
    6969  size_t               node_size
    70 );
     70)
     71{
     72  _Chain_Initialize(
     73    &freechain->Free,
     74    initial_nodes,
     75    number_nodes,
     76    node_size
     77  );
     78}
    7179
    7280/**
  • cpukit/include/rtems/score/interr.h

    r0f5b2c09 r21275b58  
    174174  /* INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL = 17, */
    175175  /* INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_FROM_BAD_STATE = 18, */
    176   INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 = 19,
     176  /* INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 = 19, */
    177177  /* INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP = 20, */
    178178  INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21,
  • cpukit/include/rtems/score/object.h

    r0f5b2c09 r21275b58  
    308308 * @return This method returns an object Id constructed from the arguments.
    309309 */
    310 RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(
    311   Objects_APIs     the_api,
    312   uint16_t         the_class,
    313   uint8_t          node,
    314   uint16_t         index
    315 )
    316 {
    317   return (( (Objects_Id) the_api )   << OBJECTS_API_START_BIT)   |
    318          (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
    319          (( (Objects_Id) node )      << OBJECTS_NODE_START_BIT)  |
    320          (( (Objects_Id) index )     << OBJECTS_INDEX_START_BIT);
    321 }
     310#define _Objects_Build_id( the_api, the_class, node, index ) \
     311  ( (Objects_Id) ( (Objects_Id) the_api   << OBJECTS_API_START_BIT )   | \
     312                 ( (Objects_Id) the_class << OBJECTS_CLASS_START_BIT ) | \
     313                 ( (Objects_Id) node      << OBJECTS_NODE_START_BIT )  | \
     314                 ( (Objects_Id) index     << OBJECTS_INDEX_START_BIT ) )
    322315
    323316/**
     
    329322 * @retval false The object count is fixed.
    330323 */
    331 RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum )
    332 {
    333   return (maximum & OBJECTS_UNLIMITED_OBJECTS) != 0;
    334 }
     324#define _Objects_Is_unlimited( maximum ) \
     325  ( ( ( maximum ) & OBJECTS_UNLIMITED_OBJECTS ) != 0 )
    335326
    336327/*
  • cpukit/include/rtems/score/objectdata.h

    r0f5b2c09 r21275b58  
    2020
    2121#include <rtems/score/object.h>
    22 #include <rtems/score/chain.h>
     22#include <rtems/score/chainimpl.h>
    2323#include <rtems/score/rbtree.h>
    2424
     
    4646} Objects_Control;
    4747
     48/**
     49 *  This enumerated type is used in the class field of the object ID
     50 *  for RTEMS internal object classes.
     51 */
     52typedef enum {
     53  OBJECTS_INTERNAL_NO_CLASS =  0,
     54  OBJECTS_INTERNAL_THREADS  =  1
     55} Objects_Internal_API;
     56
     57/**
     58 *  This enumerated type is used in the class field of the object ID
     59 *  for the RTEMS Classic API.
     60 */
     61typedef enum {
     62  OBJECTS_CLASSIC_NO_CLASS     = 0,
     63  OBJECTS_RTEMS_TASKS          = 1,
     64  OBJECTS_RTEMS_TIMERS         = 2,
     65  OBJECTS_RTEMS_SEMAPHORES     = 3,
     66  OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
     67  OBJECTS_RTEMS_PARTITIONS     = 5,
     68  OBJECTS_RTEMS_REGIONS        = 6,
     69  OBJECTS_RTEMS_PORTS          = 7,
     70  OBJECTS_RTEMS_PERIODS        = 8,
     71  OBJECTS_RTEMS_EXTENSIONS     = 9,
     72  OBJECTS_RTEMS_BARRIERS       = 10
     73} Objects_Classic_API;
     74
     75/**
     76 *  This enumerated type is used in the class field of the object ID
     77 *  for the POSIX API.
     78 */
     79typedef enum {
     80  OBJECTS_POSIX_NO_CLASS            = 0,
     81  OBJECTS_POSIX_THREADS             = 1,
     82  OBJECTS_POSIX_KEYS                = 2,
     83  OBJECTS_POSIX_INTERRUPTS          = 3,
     84  OBJECTS_POSIX_MESSAGE_QUEUES      = 5,
     85  OBJECTS_POSIX_SEMAPHORES          = 7,
     86  OBJECTS_POSIX_TIMERS              = 9,
     87  OBJECTS_POSIX_SHMS                = 12
     88} Objects_POSIX_API;
     89
     90/**
     91 * @brief Constant for the object information string name length to indicate
     92 * that this object class has no string names.
     93 */
     94#define OBJECTS_NO_STRING_NAME 0
     95
    4896#if defined( RTEMS_MULTIPROCESSING )
     97struct _Thread_Control;
     98
    4999/**
    50100 * @brief This defines the Global Object Control Block used to manage objects
     
    87137  uint32_t name;
    88138} Objects_MP_Control;
    89 #endif
     139
     140/**
     141 *  The following type defines the callout used when a local task
     142 *  is extracted from a remote thread queue (i.e. it's proxy must
     143 *  extracted from the remote queue).
     144 */
     145typedef void ( *Objects_Thread_queue_Extract_callout )(
     146  struct _Thread_Control *,
     147  Objects_Id
     148);
     149#endif
     150
     151/**
     152 *  The following defines the structure for the information used to
     153 *  manage each class of objects.
     154 */
     155typedef struct {
     156  /** This is the maximum valid id of this object class. */
     157  Objects_Id        maximum_id;
     158  /** This points to the table of local objects. */
     159  Objects_Control **local_table;
     160  /** This is the number of objects on the Inactive list. */
     161  Objects_Maximum   inactive;
     162  /** This is the number of objects in a block. */
     163  Objects_Maximum   objects_per_block;
     164  /** This is the size in bytes of each object instance. */
     165  uint16_t          object_size;
     166  /**
     167   * @brief This is the maximum length of names.
     168   *
     169   * A length of zero indicates that this object has a no string name
     170   * (OBJECTS_NO_STRING_NAME).
     171   */
     172  uint16_t          name_length;
     173  /** This is the chain of inactive control blocks. */
     174  Chain_Control     Inactive;
     175  /** This is the number of inactive objects per block. */
     176  Objects_Maximum  *inactive_per_block;
     177  /** This is a table to the chain of inactive object memory blocks. */
     178  Objects_Control **object_blocks;
     179  Objects_Control  *initial_objects;
     180  #if defined(RTEMS_MULTIPROCESSING)
     181    /** This is this object class' method called when extracting a thread. */
     182    Objects_Thread_queue_Extract_callout extract;
     183
     184    /**
     185     * @brief The global objects of this object information sorted by object
     186     * identifier.
     187     */
     188    RBTree_Control   Global_by_id;
     189
     190    /**
     191     * @brief The global objects of this object information sorted by object
     192     * name.
     193     *
     194     * Objects with the same name are sorted according to their identifier.
     195     */
     196    RBTree_Control   Global_by_name;
     197  #endif
     198}   Objects_Information;
     199
     200#if defined(RTEMS_MULTIPROCESSING)
     201#define OBJECTS_INFORMATION_MP( name, extract ) \
     202  , \
     203  extract, \
     204  RBTREE_INITIALIZER_EMPTY( name.Global_by_id ), \
     205  RBTREE_INITIALIZER_EMPTY( name.Global_by_name )
     206#else
     207#define OBJECTS_INFORMATION_MP( name, extract )
     208#endif
     209
     210/**
     211 * @brief Statically initializes an objects information.
     212 *
     213 * The initialized objects information contains no objects.
     214 *
     215 * @param name The object class C designator namespace prefix, e.g. _Semaphore.
     216 * @param api The object API number, e.g. OBJECTS_CLASSIC_API.
     217 * @param cls The object class number, e.g. OBJECTS_RTEMS_SEMAPHORES.
     218 * @param nl The object name string length, use OBJECTS_NO_STRING_NAME for
     219 *   objects without a string name.
     220 */
     221#define OBJECTS_INFORMATION_DEFINE_ZERO( name, api, cls, nl ) \
     222Objects_Information name##_Information = { \
     223  _Objects_Build_id( api, cls, 1, 0 ), \
     224  NULL, \
     225  0, \
     226  0, \
     227  0, \
     228  nl, \
     229  CHAIN_INITIALIZER_EMPTY( name##_Information.Inactive ), \
     230  NULL, \
     231  NULL, \
     232  NULL \
     233  OBJECTS_INFORMATION_MP( name##_Information, NULL ) \
     234}
     235
     236/**
     237 * @brief Statically initializes an objects information.
     238 *
     239 * The initialized objects information references a table with statically
     240 * allocated objects as specified by the object maximum parameter.  These
     241 * objects must be registered via a call to _Objects_Information().
     242 *
     243 * @param name The object class C designator namespace prefix, e.g. _Semaphore.
     244 * @param api The object API number, e.g. OBJECTS_CLASSIC_API.
     245 * @param cls The object class number, e.g. OBJECTS_RTEMS_SEMAPHORES.
     246 * @param type The object class type.
     247 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     248 *   may be set).
     249 * @param nl The object name string length, use OBJECTS_NO_STRING_NAME for
     250 *   objects without a string name.
     251 * @param ex The optional object extraction method.  Used only if
     252 *   multiprocessing (RTEMS_MULTIPROCESSING) is enabled.
     253 */
     254#define OBJECTS_INFORMATION_DEFINE( name, api, cls, type, max, nl, ex ) \
     255static Objects_Control * \
     256name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
     257static type name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
     258Objects_Information name##_Information = { \
     259  _Objects_Build_id( api, cls, 1, _Objects_Maximum_per_allocation( max ) ), \
     260  name##_Local_table, \
     261  0, \
     262  _Objects_Is_unlimited( max ) ? _Objects_Maximum_per_allocation( max ) : 0, \
     263  sizeof( type ), \
     264  nl, \
     265  CHAIN_INITIALIZER_EMPTY( name##_Information.Inactive ), \
     266  NULL, \
     267  NULL, \
     268  &name##_Objects[ 0 ].Object \
     269  OBJECTS_INFORMATION_MP( name##_Information, ex ) \
     270}
    90271
    91272/** @} */
  • cpukit/include/rtems/score/objectimpl.h

    r0f5b2c09 r21275b58  
    4444);
    4545
    46 /**
    47  *  This enumerated type is used in the class field of the object ID
    48  *  for RTEMS internal object classes.
    49  */
    50 typedef enum {
    51   OBJECTS_INTERNAL_NO_CLASS =  0,
    52   OBJECTS_INTERNAL_THREADS  =  1
    53 } Objects_Internal_API;
    54 
    5546/** This macro is used to generically specify the last API index. */
    5647#define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS
    5748
    58 /**
    59  *  This enumerated type is used in the class field of the object ID
    60  *  for the RTEMS Classic API.
    61  */
    62 typedef enum {
    63   OBJECTS_CLASSIC_NO_CLASS     = 0,
    64   OBJECTS_RTEMS_TASKS          = 1,
    65   OBJECTS_RTEMS_TIMERS         = 2,
    66   OBJECTS_RTEMS_SEMAPHORES     = 3,
    67   OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
    68   OBJECTS_RTEMS_PARTITIONS     = 5,
    69   OBJECTS_RTEMS_REGIONS        = 6,
    70   OBJECTS_RTEMS_PORTS          = 7,
    71   OBJECTS_RTEMS_PERIODS        = 8,
    72   OBJECTS_RTEMS_EXTENSIONS     = 9,
    73   OBJECTS_RTEMS_BARRIERS       = 10
    74 } Objects_Classic_API;
    75 
    7649/** This macro is used to generically specify the last API index. */
    7750#define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS
    78 
    79 /**
    80  *  This enumerated type is used in the class field of the object ID
    81  *  for the POSIX API.
    82  */
    83 typedef enum {
    84   OBJECTS_POSIX_NO_CLASS            = 0,
    85   OBJECTS_POSIX_THREADS             = 1,
    86   OBJECTS_POSIX_KEYS                = 2,
    87   OBJECTS_POSIX_INTERRUPTS          = 3,
    88   OBJECTS_POSIX_MESSAGE_QUEUES      = 5,
    89   OBJECTS_POSIX_SEMAPHORES          = 7,
    90   OBJECTS_POSIX_TIMERS              = 9,
    91   OBJECTS_POSIX_SHMS                = 12
    92 } Objects_POSIX_API;
    9351
    9452/** This macro is used to generically specify the last API index. */
     
    10361  OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1
    10462} Objects_Fake_objects_API;
    105 
    106 #if defined(RTEMS_MULTIPROCESSING)
    107 /**
    108  *  The following type defines the callout used when a local task
    109  *  is extracted from a remote thread queue (i.e. it's proxy must
    110  *  extracted from the remote queue).
    111  */
    112 typedef void ( *Objects_Thread_queue_Extract_callout )(
    113   Thread_Control *,
    114   Objects_Id
    115 );
    116 #endif
    117 
    118 /**
    119  *  The following defines the structure for the information used to
    120  *  manage each class of objects.
    121  */
    122 typedef struct {
    123   /** This is the maximum valid id of this object class. */
    124   Objects_Id        maximum_id;
    125   /** This points to the table of local objects. */
    126   Objects_Control **local_table;
    127   /** This is the number of objects on the Inactive list. */
    128   Objects_Maximum   inactive;
    129   /**
    130    * @brief This is the number of objects in a block if the automatic extension
    131    * is enabled.
    132    *
    133    * This member is zero if the automatic extension is disabled.
    134    */
    135   Objects_Maximum   objects_per_block;
    136   /** This is the size in bytes of each object instance. */
    137   uint16_t          object_size;
    138   /**
    139    * @brief This is the maximum length of names.
    140    *
    141    * A length of zero indicates that this object has a no string name
    142    * (OBJECTS_NO_STRING_NAME).
    143    */
    144   uint16_t          name_length;
    145   /** This is the chain of inactive control blocks. */
    146   Chain_Control     Inactive;
    147   /** This is the number of inactive objects per block. */
    148   Objects_Maximum  *inactive_per_block;
    149   /** This is a table to the chain of inactive object memory blocks. */
    150   Objects_Control **object_blocks;
    151   #if defined(RTEMS_MULTIPROCESSING)
    152     /** This is this object class' method called when extracting a thread. */
    153     Objects_Thread_queue_Extract_callout extract;
    154 
    155     /**
    156      * @brief The global objects of this object information sorted by object
    157      * identifier.
    158      */
    159     RBTree_Control   Global_by_id;
    160 
    161     /**
    162      * @brief The global objects of this object information sorted by object
    163      * name.
    164      *
    165      * Objects with the same name are sorted according to their identifier.
    166      */
    167     RBTree_Control   Global_by_name;
    168   #endif
    169 }   Objects_Information;
    17063
    17164/**
     
    223116);
    224117
    225 void _Objects_Do_initialize_information(
    226   Objects_Information *information,
    227   Objects_APIs         the_api,
    228   uint16_t             the_class,
    229   uint32_t             maximum,
    230   uint16_t             object_size,
    231   uint16_t             maximum_name_length
    232 #if defined(RTEMS_MULTIPROCESSING)
    233   ,
    234   Objects_Thread_queue_Extract_callout extract
    235 #endif
    236 );
    237 
    238 /**
    239  * @brief Constant for the object information string name length to indicate
    240  * that this object class has no string names.
    241  */
    242 #define OBJECTS_NO_STRING_NAME 0
    243 
    244 /**
    245  *  @brief Initialize object Information
    246  *
    247  *  This function initializes an object class information record.
    248  *  SUPPORTS_GLOBAL is true if the object class supports global
    249  *  objects, and false otherwise.  Maximum indicates the number
    250  *  of objects required in this class and size indicates the size
    251  *  in bytes of each control block for this object class.  The
    252  *  name length and string designator are also set.  In addition,
    253  *  the class may be a task, therefore this information is also included.
    254  *
    255  *  @param[in] information points to an object class information block.
    256  *  @param[in] the_api indicates the API associated with this information block.
    257  *  @param[in] the_class indicates the class of object being managed
    258  *             by this information block.  It is specific to @a the_api.
    259  *  @param[in] maximum is the maximum number of instances of this object
    260  *             class which may be concurrently active.
    261  *  @param[in] object_size is the size of the data structure for this class.
    262  *  @param[in] is_string is true if this object uses string style names.
    263  *  @param[in] maximum_name_length is the maximum length of object names.
    264  */
    265 #if defined(RTEMS_MULTIPROCESSING)
    266   #define _Objects_Initialize_information( \
    267     information, \
    268     the_api, \
    269     the_class, \
    270     maximum, \
    271     object_size, \
    272     maximum_name_length, \
    273     extract \
    274   ) \
    275     _Objects_Do_initialize_information( \
    276       information, \
    277       the_api, \
    278       the_class, \
    279       maximum, \
    280       object_size, \
    281       maximum_name_length, \
    282       extract \
    283     )
    284 #else
    285   #define _Objects_Initialize_information( \
    286     information, \
    287     the_api, \
    288     the_class, \
    289     maximum, \
    290     object_size, \
    291     maximum_name_length, \
    292     extract \
    293   ) \
    294     _Objects_Do_initialize_information( \
    295       information, \
    296       the_api, \
    297       the_class, \
    298       maximum, \
    299       object_size, \
    300       maximum_name_length \
    301     )
    302 #endif
     118/**
     119 * @brief Initializes the specified objects information.
     120 *
     121 * The objects information must be statically pre-initialized with the
     122 * OBJECTS_INFORMATION_DEFINE() macro before this function is called.
     123 */
     124void _Objects_Initialize_information( Objects_Information *information );
    303125
    304126/**
  • cpukit/include/rtems/score/thread.h

    r0f5b2c09 r21275b58  
    2727#include <rtems/score/mppkt.h>
    2828#endif
     29#include <rtems/score/freechain.h>
    2930#include <rtems/score/isrlock.h>
    3031#include <rtems/score/objectdata.h>
     
    910911 * This array is provided via <rtems/confdefs.h>.
    911912 *
    912  * @see _Thread_Control_add_on_count and _Thread_Control_size.
     913 * @see _Thread_Control_add_on_count.
    913914 */
    914915extern const Thread_Control_add_on _Thread_Control_add_ons[];
     
    924925
    925926/**
    926  * @brief Size of the thread control block of a particular application.
     927 * @brief Count of configured threads.
    927928 *
    928929 * This value is provided via <rtems/confdefs.h>.
    929  *
    930  * @see _Thread_Control_add_ons.
    931  */
    932 extern const size_t _Thread_Control_size;
     930 */
     931extern const size_t _Thread_Initial_thread_count;
    933932
    934933/**
     
    940939extern const size_t _Thread_Maximum_name_size;
    941940
     941/**
     942 * @brief The configured thread control block.
     943 *
     944 * This type is defined in <rtems/confdefs.h> and depends on the application
     945 * configuration.
     946 */
     947typedef struct Thread_Configured_control Thread_Configured_control;
     948
     949/**
     950 * @brief The configured thread queue heads.
     951 *
     952 * In SMP configurations, this type is defined in <rtems/confdefs.h> and depends
     953 * on the application configuration.
     954 */
     955#if defined(RTEMS_SMP)
     956typedef struct Thread_queue_Configured_heads Thread_queue_Configured_heads;
     957#else
     958typedef Thread_queue_Heads Thread_queue_Configured_heads;
     959#endif
     960
     961/**
     962 * @brief Size of the thread queue heads of a particular application.
     963 *
     964 * In SMP configurations, this value is provided via <rtems/confdefs.h>.
     965 */
     966#if defined(RTEMS_SMP)
     967extern const size_t _Thread_queue_Heads_size;
     968#else
     969#define _Thread_queue_Heads_size sizeof(Thread_queue_Heads)
     970#endif
     971
     972/**
     973 * @brief The thread object information.
     974 */
     975typedef struct {
     976  /**
     977   * @brief The object information.
     978   */
     979  Objects_Information Objects;
     980
     981  /**
     982   * @brief Thread queue heads maintenance.
     983   */
     984  union {
     985    /**
     986     * @brief Contains the initial set of thread queue heads.
     987     *
     988     * This is set by <rtems/confdefs.h> via THREAD_INFORMATION_DEFINE().
     989     */
     990    Thread_queue_Configured_heads *initial;
     991
     992    /**
     993     * @brief The free thread queue heads.
     994     *
     995     * This member is initialized by _Thread_Initialize_information().
     996     */
     997    Freechain_Control Free;
     998  } Thread_queue_heads;
     999} Thread_Information;
     1000
     1001/**
     1002 * @brief The internal thread  objects information.
     1003 */
     1004extern Thread_Information _Thread_Information;
     1005
     1006#define THREAD_INFORMATION_DEFINE_ZERO( name, api, cls ) \
     1007Thread_Information name##_Information = { \
     1008  { \
     1009    _Objects_Build_id( api, cls, 1, 0 ), \
     1010    NULL, \
     1011    0, \
     1012    0, \
     1013    0, \
     1014    0, \
     1015    CHAIN_INITIALIZER_EMPTY( name##_Information.Objects.Inactive ), \
     1016    NULL, \
     1017    NULL, \
     1018    NULL \
     1019    OBJECTS_INFORMATION_MP( name##_Information.Objects, NULL ), \
     1020  }, { \
     1021    NULL \
     1022  } \
     1023}
     1024
     1025#define THREAD_INFORMATION_DEFINE( name, api, cls, max ) \
     1026static Objects_Control * \
     1027name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
     1028static Thread_Configured_control \
     1029name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
     1030static Thread_queue_Configured_heads \
     1031name##_Heads[ _Objects_Maximum_per_allocation( max ) ]; \
     1032Thread_Information name##_Information = { \
     1033  { \
     1034    _Objects_Build_id( api, cls, 1, _Objects_Maximum_per_allocation( max ) ), \
     1035    name##_Local_table, \
     1036    0, \
     1037    _Objects_Is_unlimited( max ) ? _Objects_Maximum_per_allocation( max ) : 0, \
     1038    sizeof( Thread_Configured_control ), \
     1039    OBJECTS_NO_STRING_NAME, \
     1040    CHAIN_INITIALIZER_EMPTY( name##_Information.Objects.Inactive ), \
     1041    NULL, \
     1042    NULL, \
     1043    &name##_Objects[ 0 ].Control.Object \
     1044    OBJECTS_INFORMATION_MP( name##_Information.Objects, NULL ) \
     1045  }, { \
     1046    &name##_Heads[ 0 ] \
     1047  } \
     1048}
     1049
    9421050/**@}*/
    9431051
  • cpukit/include/rtems/score/threadimpl.h

    r0f5b2c09 r21275b58  
    3535#include <rtems/score/threadqimpl.h>
    3636#include <rtems/score/todimpl.h>
    37 #include <rtems/score/freechain.h>
    3837#include <rtems/score/watchdogimpl.h>
    3938#include <rtems/config.h>
     
    5857 */
    5958extern void *rtems_ada_self;
    60 
    61 typedef struct {
    62   Objects_Information Objects;
    63 
    64   Freechain_Control Free_thread_queue_heads;
    65 } Thread_Information;
    66 
    67 /**
    68  *  The following defines the information control block used to
    69  *  manage this class of objects.
    70  */
    71 extern Thread_Information _Thread_Internal_information;
    7259
    7360/**
     
    10188);
    10289
    103 void _Thread_Initialize_information(
    104   Thread_Information  *information,
    105   Objects_APIs         the_api,
    106   uint16_t             the_class,
    107   uint32_t             maximum
    108 );
     90void _Thread_Initialize_information( Thread_Information *information );
    10991
    11092/**
     
    829811{
    830812  return (Thread_Control *)
    831     _Objects_Allocate_unprotected( &_Thread_Internal_information.Objects );
     813    _Objects_Allocate_unprotected( &_Thread_Information.Objects );
    832814}
    833815
  • cpukit/include/rtems/score/threadq.h

    r0f5b2c09 r21275b58  
    395395} Thread_queue_Heads;
    396396
    397 #if defined(RTEMS_SMP)
    398   #define THREAD_QUEUE_HEADS_SIZE( scheduler_count ) \
    399     ( sizeof( Thread_queue_Heads ) \
    400       + ( scheduler_count ) * sizeof( Thread_queue_Priority_queue ) )
    401 #else
    402   #define THREAD_QUEUE_HEADS_SIZE( scheduler_count ) \
    403     sizeof( Thread_queue_Heads )
    404 #endif
    405 
    406397struct Thread_queue_Queue {
    407398  /**
Note: See TracChangeset for help on using the changeset viewer.