Changeset b07e642a in rtems for testsuites/smptests


Ignore:
Timestamp:
Dec 2, 2016, 12:39:40 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
38bc13f
Parents:
f65dcc7
git-author:
Sebastian Huber <sebastian.huber@…> (12/02/16 12:39:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/02/16 12:56:04)
Message:

smpthreadlife01: Fix due to robust thread dispatch

Update #2811.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/smptests/smpthreadlife01/init.c

    rf65dcc7 rb07e642a  
    266266  test_context *ctx = &test_instance;
    267267  rtems_status_code sc;
    268   ISR_Level level;
    269 
    270   _ISR_Local_disable(level);
    271   (void) level;
    272268
    273269  ctx->delay_switch_for_executing = _Thread_Get_executing();
     
    332328static void op_begin_suspend(void)
    333329{
    334   rtems_task_suspend(RTEMS_SELF);
    335   rtems_test_assert(0);
     330  rtems_status_code sc;
     331
     332  sc = rtems_task_suspend(RTEMS_SELF);
     333  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    336334}
    337335
    338336static void op_begin_event(void)
    339337{
     338  rtems_status_code sc;
    340339  rtems_event_set events;
    341340
    342   rtems_event_receive(
     341  events = 0;
     342  sc = rtems_event_receive(
    343343    RTEMS_EVENT_0,
    344344    RTEMS_EVENT_ALL | RTEMS_WAIT,
     
    346346    &events
    347347  );
    348   rtems_test_assert(0);
     348  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     349  rtems_test_assert(events == RTEMS_EVENT_0);
    349350}
    350351
    351352static void op_begin_event_system(void)
    352353{
     354  rtems_status_code sc;
    353355  rtems_event_set events;
    354356
    355   rtems_event_system_receive(
     357  events = 0;
     358  sc = rtems_event_system_receive(
    356359    RTEMS_EVENT_0,
    357360    RTEMS_EVENT_ALL | RTEMS_WAIT,
     
    359362    &events
    360363  );
    361   rtems_test_assert(0);
     364  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     365  rtems_test_assert(events == RTEMS_EVENT_0);
    362366}
    363367
     
    402406  test_context *ctx = &test_instance;
    403407  test_op op = arg;
    404   ISR_Level level;
    405 
    406   _ISR_Local_disable(level);
    407   (void) level;
     408  Thread_Life_state previous_life_state;
     409
     410  previous_life_state = _Thread_Set_life_protection(THREAD_LIFE_PROTECTED);
    408411
    409412  /* (E) */
     
    414417
    415418  (*test_ops_begin[op])();
     419
     420  _Thread_Set_life_protection(previous_life_state);
     421  rtems_test_assert(0);
    416422}
    417423
Note: See TracChangeset for help on using the changeset viewer.