Changeset f2a776ac in rtems


Ignore:
Timestamp:
Jun 17, 2008, 6:52:30 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
4175abd
Parents:
bbfe59b
Message:

2008-06-17 Joel Sherrill <joel.sherrill@…>

  • sapi/include/confdefs.h: The math in the _Configure_Object_RAM macro was always adding heap overhead even when the number of objects configured was zero and we would not do an allocation. This resulted in an over estimation of the amount of Workspace required (~2K on minimum.exe on PowerPC).
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rbbfe59b rf2a776ac  
     12008-06-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sapi/include/confdefs.h: The math in the _Configure_Object_RAM macro
     4        was always adding heap overhead even when the number of objects
     5        configured was zero and we would not do an allocation. This resulted
     6        in an over estimation of the amount of Workspace required (~2K on
     7        minimum.exe on PowerPC).
     8
    192008-06-17      Chris Johns <chrisj@rtems.org>
    210
  • cpukit/sapi/include/confdefs.h

    rbbfe59b rf2a776ac  
    644644        #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS     32
    645645      #endif
     646      #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
     647        _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control))
    646648
    647649      #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
    648650        #define CONFIGURE_MP_MAXIMUM_PROXIES            32
    649651      #endif
     652      #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
     653        _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
    650654
    651655      #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
     
    695699
    696700  #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
     701    #define CONFIGURE_NOTEPADS_ENABLED           TRUE
     702  #else
    697703    #define CONFIGURE_NOTEPADS_ENABLED           FALSE
    698   #else
    699     #define CONFIGURE_NOTEPADS_ENABLED           TRUE
    700   #endif
    701 
     704  #endif
     705
     706  #ifndef CONFIGURE_DISABLE_CLASSIC_NOTEPADS
     707    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
     708      sizeof(RTEMS_API_Control)
     709  #else
     710    #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \
     711      (sizeof(RTEMS_API_Control) - (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)))
     712  #endif
     713
     714  /**
     715   *  This macro calculates the memory required for task variables.
     716   *
     717   *  @note Each task variable is individually allocated from the Workspace.
     718   *        Hence, we do the multiplication on the configured size.
     719   */
    702720  #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES
    703     #define CONFIGURE_MAXIMUM_TASK_VARIABLES      0
     721    #define CONFIGURE_MAXIMUM_TASK_VARIABLES                     0
     722    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0
     723  #else
     724    #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \
     725      (_task_variables) * \
     726         _Configure_From_workspace(sizeof(rtems_task_variable_t))
    704727  #endif
    705728
    706729  #ifndef CONFIGURE_MAXIMUM_TIMERS
    707     #define CONFIGURE_MAXIMUM_TIMERS              0
     730    #define CONFIGURE_MAXIMUM_TIMERS             0
     731    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0
     732  #else
     733    #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
     734      _Configure_Object_RAM(_timers, sizeof(Timer_Control) )
    708735  #endif
    709736
    710737  #ifndef CONFIGURE_MAXIMUM_SEMAPHORES
    711     #define CONFIGURE_MAXIMUM_SEMAPHORES          0
     738    #define CONFIGURE_MAXIMUM_SEMAPHORES                 0
     739  #else
     740  #endif
     741
     742  /*
     743   * If there are no user or support semaphores defined, then we can assume
     744   * that no memory need be allocated at all for semaphores.
     745   */
     746  #if  ((CONFIGURE_MAXIMUM_SEMAPHORES == 0) && \
     747        (CONFIGURE_LIBIO_SEMAPHORES == 0) && \
     748        (CONFIGURE_TERMIOS_SEMAPHORES == 0))
     749    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0
     750  #else
     751    #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
     752      _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
    712753  #endif
    713754
    714755  #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
    715     #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      0
     756    #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES             0
     757    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0
     758  #else
     759    #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
     760      _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) )
    716761  #endif
    717762
    718763  #ifndef CONFIGURE_MAXIMUM_PARTITIONS
    719     #define CONFIGURE_MAXIMUM_PARTITIONS          0
     764    #define CONFIGURE_MAXIMUM_PARTITIONS                 0
     765    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0
     766  #else
     767    #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
     768      _Configure_Object_RAM(_partitions, sizeof(Partition_Control) )
    720769  #endif
    721770
    722771  #ifndef CONFIGURE_MAXIMUM_REGIONS
    723     #define CONFIGURE_MAXIMUM_REGIONS             0
     772    #define CONFIGURE_MAXIMUM_REGIONS              0
     773    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0
     774  #else
     775    #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
     776      _Configure_Object_RAM(_regions, sizeof(Region_Control) )
    724777  #endif
    725778
    726779  #ifndef CONFIGURE_MAXIMUM_PORTS
    727     #define CONFIGURE_MAXIMUM_PORTS               0
     780    #define CONFIGURE_MAXIMUM_PORTS            0
     781    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) 0
     782  #else
     783    #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
     784      _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) )
    728785  #endif
    729786
    730787  #ifndef CONFIGURE_MAXIMUM_PERIODS
    731     #define CONFIGURE_MAXIMUM_PERIODS             0
     788    #define CONFIGURE_MAXIMUM_PERIODS              0
     789    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0
     790  #else
     791    #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
     792      _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) )
    732793  #endif
    733794
    734795  #ifndef CONFIGURE_MAXIMUM_BARRIERS
    735     #define CONFIGURE_MAXIMUM_BARRIERS            0
     796    #define CONFIGURE_MAXIMUM_BARRIERS               0
     797    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0
     798  #else
     799    #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
     800      _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) )
    736801  #endif
    737802
    738803  #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS
    739     #define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
     804    #define CONFIGURE_MAXIMUM_USER_EXTENSIONS                 0
     805    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0
     806  #else
     807    #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
     808      _Configure_Object_RAM(_extensions, sizeof(Extension_Control) )
    740809  #endif
    741810
     
    816885  #include <rtems/posix/timer.h>
    817886
     887  /**
     888   *  Account for the object control structures plus the name
     889   *  of the object to be duplicated.
     890   */
     891  #define _Configure_POSIX_Named_Object_RAM(_number, _size) \
     892    _Configure_Object_RAM( (_number), _size ) + \
     893    ((_number) + _Configure_From_workspace(NAME_MAX) )
     894
    818895  #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
    819896    #define CONFIGURE_MAXIMUM_POSIX_THREADS      0
    820897  #endif
    821898
     899  #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
     900    ( \
     901      sizeof (POSIX_API_Control) + \
     902     (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
     903    )
     904
    822905  #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
    823     #define CONFIGURE_MAXIMUM_POSIX_MUTEXES      0
     906    #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              0
     907    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) 0
     908  #else
     909    #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
     910      _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
    824911  #endif
    825912
    826913  #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
    827     #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  0
     914    #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES               0
     915    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) 0
     916  #else
     917    #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
     918        _Configure_Object_RAM(_condvars, \
     919                            sizeof(POSIX_Condition_variables_Control) )
    828920  #endif
    829921
    830922  #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS
    831     #define CONFIGURE_MAXIMUM_POSIX_KEYS         0
     923    #define CONFIGURE_MAXIMUM_POSIX_KEYS           0
     924    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) 0
     925  #else
     926    #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
     927      _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) )
    832928  #endif
    833929
    834930  #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
    835     #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0
     931    #define CONFIGURE_MAXIMUM_POSIX_TIMERS             0
     932    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) 0
     933  #else
     934    #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
     935      _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
    836936  #endif
    837937
    838938  #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS
    839     #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0
     939    #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS                     0
     940    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) 0
     941  #else
     942    #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
     943      _Configure_From_workspace( \
     944        (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
    840945  #endif
    841946
    842947  #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
    843     #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
     948    #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES                     0
     949    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) 0
     950  #else
     951    #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
     952      _Configure_POSIX_Named_Object_RAM( \
     953         _message_queues, sizeof(POSIX_Message_queue_Control) )
    844954  #endif
    845955
    846956  #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
    847     #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0
     957    #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES                 0
     958    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) 0
     959  #else
     960    #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
     961      _Configure_POSIX_Named_Object_RAM( \
     962         _semaphores, sizeof(POSIX_Semaphore_Control) )
    848963  #endif
    849964
    850965  #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS
    851     #define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0
     966    #define CONFIGURE_MAXIMUM_POSIX_BARRIERS               0
     967    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) 0
     968  #else
     969    #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \
     970      _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
    852971  #endif
    853972
    854973  #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS
    855     #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0
     974    #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS                0
     975    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) 0
     976  #else
     977    #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
     978      _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
    856979  #endif
    857980
    858981  #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS
    859     #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0
     982    #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS              0
     983    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) 0
     984  #else
     985    #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
     986      _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
    860987  #endif
    861988
     
    9021029
    9031030  #endif
    904 
    905   #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
    906     ( \
    907       sizeof (POSIX_API_Control) + \
    908      (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
    909     )
    910 
    911   #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
    912     _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
    913 
    914   #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
    915     _Configure_Object_RAM(_condition_variables, \
    916                           sizeof(POSIX_Condition_variables_Control) )
    917 
    918   #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \
    919     _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) )
    920 
    921   #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \
    922     _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
    923 
    924   #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \
    925     _Configure_From_workspace( \
    926       (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
    927 
    928   /**
    929    *  Account for the object control structures plus the name
    930    *  of the object to be duplicated.
    931    */
    932   #define _Configure_POSIX_Named_Object_RAM(_number, _size) \
    933     _Configure_Object_RAM( (_number), _size ) + \
    934     ((_number) + _Configure_From_workspace(NAME_MAX) )
    935 
    936   #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
    937     _Configure_POSIX_Named_Object_RAM( \
    938        _message_queues, sizeof(POSIX_Message_queue_Control) )
    939 
    940   #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
    941     _Configure_POSIX_Named_Object_RAM( \
    942        _semaphores, sizeof(POSIX_Semaphore_Control) )
    943 
    944   #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \
    945     _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
    946 
    947   #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \
    948     _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
    949 
    950   #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \
    951     _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
    9521031
    9531032  #define CONFIGURE_MEMORY_FOR_POSIX \
     
    10451124    #define CONFIGURE_MAXIMUM_ITRON_TASKS      0
    10461125  #endif
     1126  #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0
    10471127
    10481128  #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES
    1049     #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES   0
     1129    #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES                 0
     1130    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) 0
     1131  #else
     1132    #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
     1133      _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control))
    10501134  #endif
    10511135
    10521136  #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS
    1053     #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS   0
     1137    #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS                 0
     1138    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) 0
     1139  #else
     1140    #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
     1141      _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control))
    10541142  #endif
    10551143
    10561144  #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES
    1057     #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES   0
     1145    #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES                0
     1146    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) 0
     1147  #else
     1148    #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
     1149      _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control))
    10581150  #endif
    10591151
    10601152  #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS
    1061     #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS   0
     1153    #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS                      0
     1154    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) 0
     1155  #else
     1156    #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
     1157      _Configure_Object_RAM(_message_buffers, \
     1158        sizeof(ITRON_Message_buffer_Control))
    10621159  #endif
    10631160
    10641161  #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS
    1065     #define CONFIGURE_MAXIMUM_ITRON_PORTS   0
     1162    #define CONFIGURE_MAXIMUM_ITRON_PORTS            0
     1163    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) 0
     1164  #else
     1165    #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
     1166      _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control))
    10661167  #endif
    10671168
    10681169  #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS
    1069     #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS   0
     1170    #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS            0
     1171    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) 0
     1172  #else
     1173    #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) \
     1174      _Configure_Object_RAM( _pools, sizeof(ITRON_Variable_memory_pool_Control))
    10701175  #endif
    10711176
    10721177  #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS
    1073     #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS   0
     1178    #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS            0
     1179    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) 0
     1180  #else
     1181    #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) \
     1182      _Configure_Object_RAM(_pools, sizeof(ITRON_Fixed_memory_pool_Control))
    10741183  #endif
    10751184
     
    11301239
    11311240  #endif
    1132 
    1133   #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0
    1134 
    1135   #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \
    1136     _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control))
    1137 
    1138   #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \
    1139     _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control))
    1140 
    1141   #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \
    1142     _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control))
    1143 
    1144   #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \
    1145     _Configure_Object_RAM(_message_buffers, \
    1146       sizeof(ITRON_Message_buffer_Control))
    1147 
    1148   #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \
    1149     _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control))
    1150 
    1151   #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \
    1152     _Configure_Object_RAM( \
    1153       _memory_pools, sizeof(ITRON_Variable_memory_pool_Control))
    1154 
    1155   #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \
    1156     _Configure_Object_RAM( \
    1157     _fixed_memory_pools, sizeof(ITRON_Fixed_memory_pool_Control))
    11581241
    11591242  #define CONFIGURE_MEMORY_FOR_ITRON \
     
    12251308
    12261309/**
    1227  *  This macro calculates the memory required for task variables.
    1228  *
    1229  *  @note Each task variable is individually allocated from the Workspace.
    1230  *        Hence, we do the multiplication on the configured size.
    1231  */
    1232 #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \
    1233   (_task_variables) * _Configure_From_workspace(sizeof(rtems_task_variable_t))
    1234 
    1235 #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
    1236   _Configure_Object_RAM(_timers, sizeof(Timer_Control) )
    1237 
    1238 #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
    1239 _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
    1240 
    1241 #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
    1242 _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) )
    1243 
    1244 #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
    1245 _Configure_Object_RAM(_partitions, sizeof(Partition_Control) )
    1246 
    1247 #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
    1248 _Configure_Object_RAM(_regions, sizeof(Region_Control) )
    1249 
    1250 #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
    1251 _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) )
    1252 
    1253 #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
    1254 _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) )
    1255 
    1256 #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \
    1257 _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) )
    1258 
    1259 #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
    1260 _Configure_Object_RAM(_extensions, sizeof(Extension_Control) )
    1261 
     1310 *  This defines the amount of memory configured for the multiprocessing
     1311 *  support required by this application.
     1312 */
    12621313#ifdef CONFIGURE_MP_APPLICATION
    1263 
    1264 #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
    1265 
    1266 #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
    1267   _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) )
    1268 
    1269 #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
    1270   _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control))
    1271 
    1272 #define CONFIGURE_MEMORY_FOR_MP \
    1273   ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
    1274     CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
    1275     CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \
    1276     CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \
     1314  #define CONFIGURE_MEMORY_FOR_MP \
     1315    (CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
     1316     CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \
     1317             CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \
     1318     CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \
     1319     CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \
    12771320  )
    1278 
    1279 #endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
    1280 
    12811321#else
    1282 
    1283 #define CONFIGURE_MEMORY_FOR_MP  0
    1284 
     1322  #define CONFIGURE_MEMORY_FOR_MP  0
    12851323#endif
    12861324
     
    14721510    uint32_t TASKS;
    14731511    uint32_t INIT_TASK_STACKS;
     1512    uint32_t CLASSIC_SEMAPHORES;
    14741513  } Configuration_Debug_t;
    14751514
     
    14801519    CONFIGURE_MEMORY_FOR_TASKS(   /* MEMORY_TASKS */
    14811520        CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS),
    1482     CONFIGURE_INITIALIZATION_THREADS_STACKS /* INIT_TASK_STACKS */
     1521    CONFIGURE_INITIALIZATION_THREADS_STACKS, /* INIT_TASK_STACKS */
     1522    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
     1523      CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES)
    14831524  };
    14841525#endif
Note: See TracChangeset for help on using the changeset viewer.