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


Ignore:
Timestamp:
Nov 22, 2018, 6:14:51 PM (11 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/posix
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/posix/key.h

    r0f5b2c09 r21275b58  
    7272
    7373/**
     74 * @brief The initial set of POSIX key and value pairs.
     75 *
     76 * This array is provided via <rtems/confdefs.h> in case POSIX key and value
     77 * pairs are configured.  The POSIX key and value pair count in this array must
     78 * be equal to
     79 * _Objects_Maximum_per_allocation( _POSIX_Keys_Key_value_pair_maximum ).
     80 */
     81extern POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[];
     82
     83/**
     84 * @brief The POSIX key and value pairs maximum.
     85 *
     86 * This value is provided via <rtems/confdefs.h> in case POSIX key and value
     87 * pairs are configured.  The OBJECTS_UNLIMITED_OBJECTS flag may be set.
     88 */
     89extern const uint32_t _POSIX_Keys_Key_value_pair_maximum;
     90
     91/**
    7492 * @brief The data structure used to manage a POSIX key.
    7593 */
     
    86104 }  POSIX_Keys_Control;
    87105
     106/**
     107 * @brief The POSIX Key objects information.
     108 */
     109extern Objects_Information _POSIX_Keys_Information;
     110
     111/**
     112 * @brief Macro to define the objects information for the POSIX Key objects.
     113 *
     114 * This macro should only be used by <rtems/confdefs.h>.
     115 *
     116 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     117 * may be set).
     118 */
     119#define POSIX_KEYS_INFORMATION_DEFINE( max ) \
     120  OBJECTS_INFORMATION_DEFINE( \
     121    _POSIX_Keys, \
     122    OBJECTS_POSIX_API, \
     123    OBJECTS_POSIX_KEYS, \
     124    POSIX_Keys_Control, \
     125    max, \
     126    OBJECTS_NO_STRING_NAME, \
     127    NULL \
     128  )
     129
    88130/** @} */
    89131
  • cpukit/include/rtems/posix/keyimpl.h

    r0f5b2c09 r21275b58  
    3636 * @{
    3737 */
    38 
    39 /**
    40  * @brief The information control block used to manage this class of objects.
    41  */
    42 extern Objects_Information _POSIX_Keys_Information;
    4338
    4439/**
  • cpukit/include/rtems/posix/mqueue.h

    r0f5b2c09 r21275b58  
    3232#define _RTEMS_POSIX_MQUEUE_H
    3333
    34 #include <signal.h>
    35 #include <mqueue.h> /* struct mq_attr */
    3634#include <rtems/score/coremsg.h>
    3735#include <rtems/score/objectdata.h>
     36
     37#include <limits.h>
     38#include <mqueue.h>
     39#include <signal.h>
    3840
    3941#ifdef __cplusplus
     
    6264}  POSIX_Message_queue_Control;
    6365
    64 extern const uint32_t _Configuration_POSIX_Maximum_message_queues;
     66/**
     67 * @brief The POSIX Message Queue objects information.
     68 */
     69extern Objects_Information _POSIX_Message_queue_Information;
     70
     71/**
     72 * @brief Macro to define the objects information for the POSIX Message Queue
     73 * objects.
     74 *
     75 * This macro should only be used by <rtems/confdefs.h>.
     76 *
     77 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     78 * may be set).
     79 */
     80#define POSIX_MESSAGE_QUEUE_INFORMATION_DEFINE( max ) \
     81  OBJECTS_INFORMATION_DEFINE( \
     82    _POSIX_Message_queue, \
     83    OBJECTS_POSIX_API, \
     84    OBJECTS_POSIX_MESSAGE_QUEUES, \
     85    POSIX_Message_queue_Control, \
     86    max, \
     87    _POSIX_PATH_MAX, \
     88    NULL \
     89  )
    6590
    6691/** @} */
  • cpukit/include/rtems/posix/mqueueimpl.h

    r0f5b2c09 r21275b58  
    3030extern "C" {
    3131#endif
    32 
    33 /**
    34  *  This defines the information control block used to manage
    35  *  this class of objects.
    36  */
    37 extern Objects_Information _POSIX_Message_queue_Information;
    3832
    3933/**
  • cpukit/include/rtems/posix/pthread.h

    r0f5b2c09 r21275b58  
    3939extern const size_t _Configuration_POSIX_Minimum_stack_size;
    4040
    41 extern const uint32_t _Configuration_POSIX_Maximum_threads;
    42 
    4341/**
    4442 * @brief POSIX threads initialize user threads body.
     
    4846 */
    4947extern void _POSIX_Threads_Initialize_user_threads_body(void);
     48
     49/**
     50 * The following defines the information control block used to manage
     51 * this class of objects.
     52 */
     53extern Thread_Information _POSIX_Threads_Information;
    5054
    5155/** @} */
  • cpukit/include/rtems/posix/pthreadimpl.h

    r0f5b2c09 r21275b58  
    4242 */
    4343#define PTHREAD_MINIMUM_STACK_SIZE _Configuration_POSIX_Minimum_stack_size
    44 
    45 /**
    46  * The following defines the information control block used to manage
    47  * this class of objects.
    48  */
    49 extern Thread_Information _POSIX_Threads_Information;
    5044
    5145#if defined(RTEMS_POSIX_API)
  • cpukit/include/rtems/posix/semaphore.h

    r0f5b2c09 r21275b58  
    2020#define _RTEMS_POSIX_SEMAPHORE_H
    2121
     22#include <rtems/score/objectdata.h>
     23
     24#include <limits.h>
    2225#include <semaphore.h>
    23 #include <rtems/score/objectdata.h>
    2426
    2527#ifdef __cplusplus
     
    4749}  POSIX_Semaphore_Control;
    4850
    49 extern const uint32_t _Configuration_POSIX_Maximum_named_semaphores;
     51/**
     52 * @brief The POSIX Semaphore objects information.
     53 */
     54extern Objects_Information _POSIX_Semaphore_Information;
     55
     56/**
     57 * @brief Macro to define the objects information for the POSIX Semaphore
     58 * objects.
     59 *
     60 * This macro should only be used by <rtems/confdefs.h>.
     61 *
     62 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     63 * may be set).
     64 */
     65#define POSIX_SEMAPHORE_INFORMATION_DEFINE( max ) \
     66  OBJECTS_INFORMATION_DEFINE( \
     67    _POSIX_Semaphore, \
     68    OBJECTS_POSIX_API, \
     69    OBJECTS_POSIX_SEMAPHORES, \
     70    POSIX_Semaphore_Control, \
     71    max, \
     72    _POSIX_PATH_MAX, \
     73    NULL \
     74  )
    5075
    5176/** @} */
  • cpukit/include/rtems/posix/semaphoreimpl.h

    r0f5b2c09 r21275b58  
    3434 */
    3535#define POSIX_SEMAPHORE_MAGIC 0x5d367fe7UL
    36 
    37 /**
    38  *  This defines the information control block used to manage
    39  *  this class of objects.
    40  */
    41 extern Objects_Information _POSIX_Semaphore_Information;
    4236
    4337RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *
  • cpukit/include/rtems/posix/shm.h

    r0f5b2c09 r21275b58  
    127127} POSIX_Shm_Control;
    128128
    129 extern const uint32_t _Configuration_POSIX_Maximum_shms;
     129/**
     130 * @brief The POSIX Shared Memory objects information.
     131 */
     132extern Objects_Information _POSIX_Shm_Information;
     133
     134/**
     135 * @brief Macro to define the objects information for the POSIX Shared Memory
     136 * objects.
     137 *
     138 * This macro should only be used by <rtems/confdefs.h>.
     139 *
     140 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     141 * may be set).
     142 */
     143#define POSIX_SHM_INFORMATION_DEFINE( max ) \
     144  OBJECTS_INFORMATION_DEFINE( \
     145    _POSIX_Shm, \
     146    OBJECTS_POSIX_API, \
     147    OBJECTS_POSIX_SHMS, \
     148    POSIX_Shm_Control, \
     149    max, \
     150    _POSIX_PATH_MAX, \
     151    NULL \
     152  )
    130153
    131154/**
  • cpukit/include/rtems/posix/shmimpl.h

    r0f5b2c09 r21275b58  
    3131 * @{
    3232 */
    33 
    34 extern Objects_Information _POSIX_Shm_Information;
    3533
    3634RTEMS_INLINE_ROUTINE POSIX_Shm_Control *_POSIX_Shm_Allocate_unprotected( void )
  • cpukit/include/rtems/posix/sigset.h

    r0f5b2c09 r21275b58  
    2020#define _RTEMS_POSIX_SIGSET_H
    2121
    22 #include <signal.h> // sigset_t
     22#include <stdbool.h>
     23#include <signal.h>
    2324
    2425/*
  • cpukit/include/rtems/posix/timer.h

    r0f5b2c09 r21275b58  
    5151} POSIX_Timer_Control;
    5252
    53 extern const uint32_t _Configuration_POSIX_Maximum_timers;
     53/**
     54 * @brief The POSIX Timer objects information.
     55 */
     56extern Objects_Information _POSIX_Timer_Information;
     57
     58/**
     59 * @brief Macro to define the objects information for the POSIX Timer objects.
     60 *
     61 * This macro should only be used by <rtems/confdefs.h>.
     62 *
     63 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
     64 * may be set).
     65 */
     66#define POSIX_TIMER_INFORMATION_DEFINE( max ) \
     67  OBJECTS_INFORMATION_DEFINE( \
     68    _POSIX_Timer, \
     69    OBJECTS_POSIX_API, \
     70    OBJECTS_POSIX_TIMERS, \
     71    POSIX_Timer_Control, \
     72    max, \
     73    OBJECTS_NO_STRING_NAME, \
     74    NULL \
     75  )
    5476
    5577/** @} */
  • cpukit/include/rtems/posix/timerimpl.h

    r0f5b2c09 r21275b58  
    5151#error "POSIX_TIMER_RELATIVE == TIMER_ABSTIME"
    5252#endif
    53 
    54 /**
    55  *  The following defines the information control block used to manage
    56  *  this class of objects.
    57  */
    58 extern Objects_Information _POSIX_Timer_Information;
    5953
    6054/**
Note: See TracChangeset for help on using the changeset viewer.