Changeset 7ee6437 in rtems for testsuites


Ignore:
Timestamp:
Dec 6, 2018, 8:57:01 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d6e3473
Parents:
0a1f5df9
git-author:
Sebastian Huber <sebastian.huber@…> (12/06/18 08:57:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/07/18 13:22:01)
Message:

rtems: Add rtems_scheduler_get_maximum_priority()

Update #3636.

File:
1 edited

Legend:

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

    r0a1f5df9 r7ee6437  
    11/*
    2  * Copyright (c) 2014, 2017 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2014, 2018 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    475475}
    476476
     477static void test_scheduler_get_max_prio(void)
     478{
     479  rtems_status_code sc;
     480  rtems_task_priority priority;
     481  rtems_id scheduler_id;
     482
     483  priority = 0;
     484  sc = rtems_scheduler_get_maximum_priority(invalid_id, &priority);
     485  rtems_test_assert(sc == RTEMS_INVALID_ID);
     486  rtems_test_assert(priority == 0);
     487
     488  sc = rtems_task_get_scheduler(RTEMS_SELF, &scheduler_id);
     489  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     490
     491  sc = rtems_scheduler_get_maximum_priority(scheduler_id, NULL);
     492  rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
     493
     494  priority = 0;
     495  sc = rtems_scheduler_get_maximum_priority(scheduler_id, &priority);
     496  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     497  rtems_test_assert(priority == 255);
     498}
     499
    477500static void test_scheduler_get_processors(void)
    478501{
     
    602625  test_task_get_set_scheduler();
    603626  test_scheduler_ident();
     627  test_scheduler_get_max_prio();
    604628  test_scheduler_get_processors();
    605629  test_scheduler_add_remove_processors();
Note: See TracChangeset for help on using the changeset viewer.