Changeset e50e3f70 in rtems for testsuites


Ignore:
Timestamp:
Oct 1, 2018, 7:25:06 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f004b2b8
Parents:
57a7ecde
git-author:
Sebastian Huber <sebastian.huber@…> (10/01/18 07:25:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/01/18 10:32:54)
Message:

rtems: Add rtems_task_exit()

Update #3533.

File:
1 edited

Legend:

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

    r57a7ecde re50e3f70  
    11/*
    2  * Copyright (c) 2014, 2016 embedded brains GmbH.  All rights reserved.
     2 * Copyright (c) 2014, 2018 embedded brains GmbH.  All rights reserved.
    33 *
    44 *  embedded brains GmbH
     
    6262  DELETE_8,
    6363  DELETE_9,
     64  EXIT_0,
     65  EXIT_1,
     66  EXIT_2,
     67  EXIT_3,
    6468  INVALID
    6569} test_state;
     
    183187      ctx->current = DELETE_9;
    184188      break;
     189    case EXIT_2:
     190      assert_priority(PRIO_VERY_LOW);
     191      ctx->current = EXIT_3;
     192      break;
    185193    default:
    186194      rtems_test_assert(0);
     
    214222      assert_priority(PRIO_LOW);
    215223      ctx->current = DELETE_8;
    216       wake_up_main(ctx);
     224      break;
     225    case EXIT_1:
     226      assert_priority(PRIO_LOW);
     227      ctx->current = EXIT_2;
    217228      break;
    218229    default:
     
    293304        rtems_test_assert(0);
    294305        break;
     306      case EXIT_0:
     307        ctx->current = EXIT_1;
     308        rtems_task_exit();
     309        break;
    295310      default:
    296311        rtems_test_assert(0);
     
    400415
    401416  rtems_test_assert(rtems_resource_snapshot_check(&snapshot));
    402 
    403   rtems_test_assert(ctx->current == DELETE_9);
     417  set_priority(PRIO_INIT);
     418
     419  create_and_start_worker(ctx);
     420
     421  change_state(ctx, DELETE_9, EXIT_0, INVALID);
     422  set_priority(PRIO_VERY_LOW);
     423
     424  rtems_test_assert(rtems_resource_snapshot_check(&snapshot));
     425  set_priority(PRIO_INIT);
     426
     427  rtems_test_assert(ctx->current == EXIT_3);
    404428}
    405429
Note: See TracChangeset for help on using the changeset viewer.