Changeset 46c23871 in rtems


Ignore:
Timestamp:
Jun 16, 2020, 5:28:58 AM (7 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
5faad36, a1f9265c
Parents:
bc73a085
git-author:
Sebastian Huber <sebastian.huber@…> (06/16/20 05:28:58)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/18/20 05:09:34)
Message:

rtems: Remove RTEMS_MP_NOT_CONFIGURED error

Some objects can be created with a local or global scope in a
multiprocessing network. In non-multiprocessing configurations setting
the scope to local or global had no effect since such a system can be
viewed as a multiprocessing network with just one node. One and all
nodes is the same in such a network. However, if multiprocessing was
configured, creation of a global object in a single node network
resulted in an RTEMS_MP_NOT_CONFIGURED error. Remove this error
condition for symmetry to the non-multiprocessing setup. This is in line
with the task affinity behaviour in SMP systems.

Update #4005.

Files:
16 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/msgqcreate.c

    rbc73a085 r46c23871  
    5353
    5454#if defined(RTEMS_MULTIPROCESSING)
    55   if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
    56        !_System_state_Is_multiprocessing )
    57     return RTEMS_MP_NOT_CONFIGURED;
     55  if ( !_System_state_Is_multiprocessing ) {
     56    attribute_set = _Attributes_Clear( attribute_set, RTEMS_GLOBAL );
     57  }
     58
     59  is_global = _Attributes_Is_global( attribute_set );
    5860#endif
    5961
  • cpukit/rtems/src/partcreate.c

    rbc73a085 r46c23871  
    6767
    6868#if defined(RTEMS_MULTIPROCESSING)
    69   if ( _Attributes_Is_global( attribute_set ) &&
    70        !_System_state_Is_multiprocessing )
    71     return RTEMS_MP_NOT_CONFIGURED;
     69  if ( !_System_state_Is_multiprocessing ) {
     70    attribute_set = _Attributes_Clear( attribute_set, RTEMS_GLOBAL );
     71  }
    7272#endif
    7373
  • cpukit/rtems/src/semcreate.c

    rbc73a085 r46c23871  
    5858
    5959#if defined(RTEMS_MULTIPROCESSING)
    60   if (
    61     _Attributes_Is_global( attribute_set )
    62       && !_System_state_Is_multiprocessing
    63   ) {
    64     return RTEMS_MP_NOT_CONFIGURED;
     60  if ( !_System_state_Is_multiprocessing ) {
     61    attribute_set = _Attributes_Clear( attribute_set, RTEMS_GLOBAL );
    6562  }
    6663#endif
  • cpukit/rtems/src/taskcreate.c

    rbc73a085 r46c23871  
    112112
    113113#if defined(RTEMS_MULTIPROCESSING)
    114   if ( _Attributes_Is_global( the_attribute_set ) ) {
    115 
    116     is_global = true;
    117 
    118     if ( !_System_state_Is_multiprocessing )
    119       return RTEMS_MP_NOT_CONFIGURED;
    120 
    121   } else
    122     is_global = false;
     114  if ( !_System_state_Is_multiprocessing ) {
     115    the_attribute_set = _Attributes_Clear( the_attribute_set, RTEMS_GLOBAL );
     116  }
     117
     118  is_global = _Attributes_Is_global( the_attribute_set );
    123119#endif
    124120
  • testsuites/sptests/sp04/init.c

    rbc73a085 r46c23871  
    8585     RTEMS_MINIMUM_STACK_SIZE * 2,
    8686     RTEMS_PREEMPT|RTEMS_TIMESLICE,
    87      RTEMS_DEFAULT_ATTRIBUTES,
     87     RTEMS_GLOBAL,
    8888     &Task_id[ 2 ]
    8989  );
  • testsuites/sptests/sp12/init.c

    rbc73a085 r46c23871  
    7474    Semaphore_name[ 3 ],
    7575    1,
    76     RTEMS_DEFAULT_ATTRIBUTES,
     76    RTEMS_GLOBAL,
    7777    RTEMS_NO_PRIORITY,
    7878    &Semaphore_id[ 3 ]
  • testsuites/sptests/sp13/init.c

    rbc73a085 r46c23871  
    106106    100,
    107107    MESSAGE_SIZE,
    108     RTEMS_DEFAULT_ATTRIBUTES,
     108    RTEMS_GLOBAL,
    109109    &Queue_id[ 3 ]
    110110  );
  • testsuites/sptests/sp15/init.c

    rbc73a085 r46c23871  
    7272    274,
    7373    128,
    74     RTEMS_DEFAULT_ATTRIBUTES,
     74    RTEMS_GLOBAL,
    7575    &Partition_id[ 2 ]
    7676  );
  • testsuites/sptests/spmsgq_err01/init.c

    rbc73a085 r46c23871  
    9999  puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME" );
    100100
    101   /*
    102    *  The check for an object being global is only made if
    103    *  multiprocessing is enabled.
    104    */
    105 
    106 #if defined(RTEMS_MULTIPROCESSING)
    107   status = rtems_message_queue_create(
    108     Queue_name[ 1 ],
    109     1,
    110     MESSAGE_SIZE,
    111     RTEMS_GLOBAL,
    112     &Junk_id
    113   );
    114   fatal_directive_status(
    115     status,
    116     RTEMS_MP_NOT_CONFIGURED,
    117     "rtems_message_queue_create of mp not configured"
    118   );
    119 #endif
    120   puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED" );
    121 
    122101  /* not enough memory for messages */
    123102  status = rtems_message_queue_create(
  • testsuites/sptests/spmsgq_err01/spmsgq_err01.scn

    rbc73a085 r46c23871  
    55TA1 - rtems_message_queue_create - size = 0 - RTEMS_INVALID_SIZE
    66TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME
    7 TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED
    87TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED
    98TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED #2
  • testsuites/sptests/sppartition_err01/init.c

    rbc73a085 r46c23871  
    127127  }
    128128
    129   /*
    130    *  The check for an object being global is only made if
    131    *  multiprocessing is enabled.
    132    */
    133 
    134 #if defined(RTEMS_MULTIPROCESSING)
    135   status = rtems_partition_create(
    136     Partition_name[ 1 ],
    137     Partition_good_area,
    138     128,
    139     64,
    140     RTEMS_GLOBAL,
    141     &junk_id
    142   );
    143   fatal_directive_status(
    144     status,
    145     RTEMS_MP_NOT_CONFIGURED,
    146     "rtems_partition_create of global"
    147   );
    148 #endif
    149   puts( "TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED" );
    150 
    151129#if defined(_C3x) || defined(_C4x)
    152130  puts( "TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS - SKIPPED" );
  • testsuites/sptests/sppartition_err01/sppartition_err01.scn

    rbc73a085 r46c23871  
    55TA1 - rtems_partition_create - length < buffer size - RTEMS_INVALID_SIZE
    66TA1 - rtems_partition_create - buffer size < overhead - RTEMS_INVALID_SIZE
    7 TA1 - rtems_partition_create - RTEMS_MP_NOT_CONFIGURED
    87TA1 - rtems_partition_create - RTEMS_INVALID_ADDRESS
    98TA1 - rtems_partition_create - RTEMS_INVALID_SIZE
  • testsuites/sptests/spsem_err01/init.c

    rbc73a085 r46c23871  
    200200  puts( "TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER" );
    201201
    202   /*
    203    *  The check for an object being global is only made if
    204    *  multiprocessing is enabled.
    205    */
    206 
    207 #if defined(RTEMS_MULTIPROCESSING)
    208   status = rtems_semaphore_create(
    209     Semaphore_name[ 3 ],
    210     1,
    211     RTEMS_GLOBAL,
    212     RTEMS_NO_PRIORITY,
    213     &Junk_id
    214   );
    215   fatal_directive_status(
    216     status,
    217     RTEMS_MP_NOT_CONFIGURED,
    218     "rtems_semaphore_create of mp not configured"
    219   );
    220 #endif
    221   puts( "TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED" );
    222 
    223202  status = rtems_semaphore_delete( 100 );
    224203  fatal_directive_status(
  • testsuites/sptests/spsem_err01/spsem_err01.scn

    rbc73a085 r46c23871  
    1313TA1 - rtems_semaphore_create - RTEMS_NOT_DEFINED
    1414TA1 - rtems_semaphore_create - RTEMS_INVALID_NUMBER
    15 TA1 - rtems_semaphore_create - RTEMS_MP_NOT_CONFIGURED
    1615TA1 - rtems_semaphore_delete - RTEMS_INVALID_ID
    1716TA1 - rtems_semaphore_delete - local RTEMS_INVALID_ID
  • testsuites/sptests/sptask_err03/init.c

    rbc73a085 r46c23871  
    229229  puts( "TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY" );
    230230
    231   /*
    232    *  The check for an object being global is only made if
    233    *  multiprocessing is enabled.
    234    */
    235 
    236 #if defined(RTEMS_MULTIPROCESSING)
    237   status = rtems_task_create(
    238     task_name,
    239     4,
    240     RTEMS_MINIMUM_STACK_SIZE,
    241     RTEMS_DEFAULT_MODES,
    242     RTEMS_GLOBAL,
    243     &Junk_id
    244   );
    245   fatal_directive_status(
    246     status,
    247     RTEMS_MP_NOT_CONFIGURED,
    248     "rtems_task_create of global task in a single cpu system"
    249   );
    250 #endif
    251   puts( "TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED" );
    252  
    253231  TEST_END();
    254232}
  • testsuites/sptests/sptask_err03/sptask_err03.scn

    rbc73a085 r46c23871  
    1515TA1 - rtems_task_create - 10 created - RTEMS_SUCCESSFUL
    1616TA1 - rtems_task_create - 11 - RTEMS_TOO_MANY
    17 TA1 - rtems_task_create - RTEMS_MP_NOT_CONFIGURED
    1817*** END TEST TASK ERROR 03 ***
Note: See TracChangeset for help on using the changeset viewer.