Changeset 4b7c77b in rtems


Ignore:
Timestamp:
04/26/21 09:00:24 (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
9d82150
Parents:
127a812
git-author:
Sebastian Huber <sebastian.huber@…> (04/26/21 09:00:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/27/21 17:40:12)
Message:

rtems: Change rtems_task_get_affinity() status

In case the processor set is not large enough to contain the processor
affinity set of the task return RTEMS_INVALID_SIZE instead of
RTEMS_INVALID_NUMBER. This is more in line with other directives since
the issue is related to the size of an object.

Close #4393.

Files:
5 edited

Legend:

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

    r127a812 r4b7c77b  
    696696 * @retval STATUS_SUCCESSFUL The operation succeeded.
    697697 *
    698  * @retval STATUS_INVALID_NUMBER The processor set was too small.
     698 * @retval STATUS_INVALID_SIZE The processor set was too small.
    699699 */
    700700Status_Control _Scheduler_Get_affinity(
  • cpukit/include/rtems/score/status.h

    r127a812 r4b7c77b  
    119119  STATUS_INVALID_PRIORITY =
    120120    STATUS_BUILD( STATUS_CLASSIC_INVALID_PRIORITY, EINVAL ),
     121  STATUS_INVALID_SIZE =
     122    STATUS_BUILD( STATUS_CLASSIC_INVALID_SIZE, EINVAL ),
    121123  STATUS_MAXIMUM_COUNT_EXCEEDED =
    122124    STATUS_BUILD( STATUS_CLASSIC_UNSATISFIED, EOVERFLOW ),
  • cpukit/score/src/schedulergetaffinity.c

    r127a812 r4b7c77b  
    5252
    5353  if ( status != PROCESSOR_MASK_COPY_LOSSLESS ) {
    54     return STATUS_INVALID_NUMBER;
     54    return STATUS_INVALID_SIZE;
    5555  }
    5656
  • testsuites/smptests/smpaffinity01/init.c

    r127a812 r4b7c77b  
    8686  );
    8787  sc = rtems_task_get_affinity( Init_id,  1, &cpuset );
    88   rtems_test_assert( sc == RTEMS_INVALID_NUMBER );
     88  rtems_test_assert( sc == RTEMS_INVALID_SIZE );
    8989
    9090  /* Verify rtems_task_get_affinity validates cpuset */
  • testsuites/sptests/spscheduler01/init.c

    r127a812 r4b7c77b  
    5050      break;
    5151    case RTEMS_INVALID_NUMBER:
     52    case RTEMS_INVALID_SIZE:
    5253      rtems_test_assert(eno == EINVAL);
    5354      break;
     
    140141
    141142  sc = task_get_affinity(RTEMS_SELF, 0, &cpuset);
    142   rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
     143  rtems_test_assert(sc == RTEMS_INVALID_SIZE);
    143144
    144145  sc = task_set_affinity(RTEMS_SELF, 0, &cpuset);
Note: See TracChangeset for help on using the changeset viewer.