Changeset 1c2d178 in rtems for testsuites


Ignore:
Timestamp:
Nov 25, 2018, 7:15:26 PM (13 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f70079c
Parents:
3899bc1a
git-author:
Sebastian Huber <sebastian.huber@…> (11/25/18 19:15:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/07/18 13:22:02)
Message:

score: Remove Objects_Information::maximum

This information is already present in Objects_Information::maximum_id.
Add and use _Objects_Get_maximum_index().

Update #3621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spsysinit01/init.c

    r3899bc1a r1c2d178  
    249249FIRST(RTEMS_SYSINIT_DATA_STRUCTURES)
    250250{
    251   assert(_Thread_Internal_information.Objects.maximum == 0);
     251  assert(
     252    _Objects_Get_maximum_index(&_Thread_Internal_information.Objects) == 0
     253  );
    252254  next_step(DATA_STRUCTURES_PRE);
    253255}
     
    255257LAST(RTEMS_SYSINIT_DATA_STRUCTURES)
    256258{
    257   assert(_Thread_Internal_information.Objects.maximum != 0);
     259  assert(
     260    _Objects_Get_maximum_index(&_Thread_Internal_information.Objects) != 0
     261  );
    258262  next_step(DATA_STRUCTURES_POST);
    259263}
     
    261265FIRST(RTEMS_SYSINIT_USER_EXTENSIONS)
    262266{
    263   assert(_Extension_Information.maximum == 0);
     267  assert(_Objects_Get_maximum_index(&_Extension_Information) == 0);
    264268  next_step(USER_EXTENSIONS_PRE);
    265269}
     
    267271LAST(RTEMS_SYSINIT_USER_EXTENSIONS)
    268272{
    269   assert(_Extension_Information.maximum != 0);
     273  assert(_Objects_Get_maximum_index(&_Extension_Information) != 0);
    270274  next_step(USER_EXTENSIONS_POST);
    271275}
     
    273277FIRST(RTEMS_SYSINIT_CLASSIC_TASKS)
    274278{
    275   assert(_RTEMS_tasks_Information.Objects.maximum == 0);
     279  assert(_Objects_Get_maximum_index(&_RTEMS_tasks_Information.Objects) == 0);
    276280  next_step(CLASSIC_TASKS_PRE);
    277281}
     
    279283LAST(RTEMS_SYSINIT_CLASSIC_TASKS)
    280284{
    281   assert(_RTEMS_tasks_Information.Objects.maximum != 0);
     285  assert(_Objects_Get_maximum_index(&_RTEMS_tasks_Information.Objects) != 0);
    282286  next_step(CLASSIC_TASKS_POST);
    283287}
     
    285289FIRST(RTEMS_SYSINIT_CLASSIC_TIMER)
    286290{
    287   assert(_Timer_Information.maximum == 0);
     291  assert(_Objects_Get_maximum_index(&_Timer_Information) == 0);
    288292  next_step(CLASSIC_TIMER_PRE);
    289293}
     
    291295LAST(RTEMS_SYSINIT_CLASSIC_TIMER)
    292296{
    293   assert(_Timer_Information.maximum != 0);
     297  assert(_Objects_Get_maximum_index(&_Timer_Information) != 0);
    294298  next_step(CLASSIC_TIMER_POST);
    295299}
     
    319323FIRST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
    320324{
    321   assert(_Message_queue_Information.maximum == 0);
     325  assert(_Objects_Get_maximum_index(&_Message_queue_Information) == 0);
    322326  next_step(CLASSIC_MESSAGE_QUEUE_PRE);
    323327}
     
    325329LAST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
    326330{
    327   assert(_Message_queue_Information.maximum != 0);
     331  assert(_Objects_Get_maximum_index(&_Message_queue_Information) != 0);
    328332  next_step(CLASSIC_MESSAGE_QUEUE_POST);
    329333}
     
    331335FIRST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
    332336{
    333   assert(_Semaphore_Information.maximum == 0);
     337  assert(_Objects_Get_maximum_index(&_Semaphore_Information) == 0);
    334338  next_step(CLASSIC_SEMAPHORE_PRE);
    335339}
     
    337341LAST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
    338342{
    339   assert(_Semaphore_Information.maximum != 0);
     343  assert(_Objects_Get_maximum_index(&_Semaphore_Information) != 0);
    340344  next_step(CLASSIC_SEMAPHORE_POST);
    341345}
     
    343347FIRST(RTEMS_SYSINIT_CLASSIC_PARTITION)
    344348{
    345   assert(_Partition_Information.maximum == 0);
     349  assert(_Objects_Get_maximum_index(&_Partition_Information) == 0);
    346350  next_step(CLASSIC_PARTITION_PRE);
    347351}
     
    349353LAST(RTEMS_SYSINIT_CLASSIC_PARTITION)
    350354{
    351   assert(_Partition_Information.maximum != 0);
     355  assert(_Objects_Get_maximum_index(&_Partition_Information) != 0);
    352356  next_step(CLASSIC_PARTITION_POST);
    353357}
     
    355359FIRST(RTEMS_SYSINIT_CLASSIC_REGION)
    356360{
    357   assert(_Region_Information.maximum == 0);
     361  assert(_Objects_Get_maximum_index(&_Region_Information) == 0);
    358362  next_step(CLASSIC_REGION_PRE);
    359363}
     
    361365LAST(RTEMS_SYSINIT_CLASSIC_REGION)
    362366{
    363   assert(_Region_Information.maximum != 0);
     367  assert(_Objects_Get_maximum_index(&_Region_Information) != 0);
    364368  next_step(CLASSIC_REGION_POST);
    365369}
     
    367371FIRST(RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY)
    368372{
    369   assert(_Dual_ported_memory_Information.maximum == 0);
     373  assert(_Objects_Get_maximum_index(&_Dual_ported_memory_Information) == 0);
    370374  next_step(CLASSIC_DUAL_PORTED_MEMORY_PRE);
    371375}
     
    373377LAST(RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY)
    374378{
    375   assert(_Dual_ported_memory_Information.maximum != 0);
     379  assert(_Objects_Get_maximum_index(&_Dual_ported_memory_Information) != 0);
    376380  next_step(CLASSIC_DUAL_PORTED_MEMORY_POST);
    377381}
     
    379383FIRST(RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC)
    380384{
    381   assert(_Rate_monotonic_Information.maximum == 0);
     385  assert(_Objects_Get_maximum_index(&_Rate_monotonic_Information) == 0);
    382386  next_step(CLASSIC_RATE_MONOTONIC_PRE);
    383387}
     
    385389LAST(RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC)
    386390{
    387   assert(_Rate_monotonic_Information.maximum != 0);
     391  assert(_Objects_Get_maximum_index(&_Rate_monotonic_Information) != 0);
    388392  next_step(CLASSIC_RATE_MONOTONIC_POST);
    389393}
     
    391395FIRST(RTEMS_SYSINIT_CLASSIC_BARRIER)
    392396{
    393   assert(_Barrier_Information.maximum == 0);
     397  assert(_Objects_Get_maximum_index(&_Barrier_Information) == 0);
    394398  next_step(CLASSIC_BARRIER_PRE);
    395399}
     
    397401LAST(RTEMS_SYSINIT_CLASSIC_BARRIER)
    398402{
    399   assert(_Barrier_Information.maximum != 0);
     403  assert(_Objects_Get_maximum_index(&_Barrier_Information) != 0);
    400404  next_step(CLASSIC_BARRIER_POST);
    401405}
     
    429433FIRST(RTEMS_SYSINIT_POSIX_THREADS)
    430434{
    431   assert(_POSIX_Threads_Information.Objects.maximum == 0);
     435  assert(_Objects_Get_maximum_index(&_POSIX_Threads_Information.Objects) == 0);
    432436  next_step(POSIX_THREADS_PRE);
    433437}
     
    435439LAST(RTEMS_SYSINIT_POSIX_THREADS)
    436440{
    437   assert(_POSIX_Threads_Information.Objects.maximum != 0);
     441  assert(_Objects_Get_maximum_index(&_POSIX_Threads_Information.Objects) != 0);
    438442  next_step(POSIX_THREADS_POST);
    439443}
     
    441445FIRST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
    442446{
    443   assert(_POSIX_Message_queue_Information.maximum == 0);
     447  assert(_Objects_Get_maximum_index(&_POSIX_Message_queue_Information) == 0);
    444448  next_step(POSIX_MESSAGE_QUEUE_PRE);
    445449}
     
    447451LAST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
    448452{
    449   assert(_POSIX_Message_queue_Information.maximum != 0);
     453  assert(_Objects_Get_maximum_index(&_POSIX_Message_queue_Information) != 0);
    450454  next_step(POSIX_MESSAGE_QUEUE_POST);
    451455}
     
    453457FIRST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
    454458{
    455   assert(_POSIX_Semaphore_Information.maximum == 0);
     459  assert(_Objects_Get_maximum_index(&_POSIX_Semaphore_Information) == 0);
    456460  next_step(POSIX_SEMAPHORE_PRE);
    457461}
     
    459463LAST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
    460464{
    461   assert(_POSIX_Semaphore_Information.maximum != 0);
     465  assert(_Objects_Get_maximum_index(&_POSIX_Semaphore_Information) != 0);
    462466  next_step(POSIX_SEMAPHORE_POST);
    463467}
     
    466470FIRST(RTEMS_SYSINIT_POSIX_TIMER)
    467471{
    468   assert(_POSIX_Timer_Information.maximum == 0);
     472  assert(_Objects_Get_maximum_index(&_POSIX_Timer_Information) == 0);
    469473  next_step(POSIX_TIMER_PRE);
    470474}
     
    472476LAST(RTEMS_SYSINIT_POSIX_TIMER)
    473477{
    474   assert(_POSIX_Timer_Information.maximum != 0);
     478  assert(_Objects_Get_maximum_index(&_POSIX_Timer_Information) != 0);
    475479  next_step(POSIX_TIMER_POST);
    476480}
     
    479483FIRST(RTEMS_SYSINIT_POSIX_SHM)
    480484{
    481   assert(_POSIX_Shm_Information.maximum == 0);
     485  assert(_Objects_Get_maximum_index(&_POSIX_Shm_Information) == 0);
    482486  next_step(POSIX_SHM_PRE);
    483487}
     
    485489LAST(RTEMS_SYSINIT_POSIX_SHM)
    486490{
    487   assert(_POSIX_Shm_Information.maximum != 0);
     491  assert(_Objects_Get_maximum_index(&_POSIX_Shm_Information) != 0);
    488492  next_step(POSIX_SHM_POST);
    489493}
     
    509513FIRST(RTEMS_SYSINIT_POSIX_KEYS)
    510514{
    511   assert(_POSIX_Keys_Information.maximum == 0);
     515  assert(_Objects_Get_maximum_index(&_POSIX_Keys_Information) == 0);
    512516  next_step(POSIX_KEYS_PRE);
    513517}
     
    515519LAST(RTEMS_SYSINIT_POSIX_KEYS)
    516520{
    517   assert(_POSIX_Keys_Information.maximum != 0);
     521  assert(_Objects_Get_maximum_index(&_POSIX_Keys_Information) != 0);
    518522  next_step(POSIX_KEYS_POST);
    519523}
Note: See TracChangeset for help on using the changeset viewer.