Changeset ed24ed4e in rtems


Ignore:
Timestamp:
Feb 8, 2018, 9:47:16 AM (22 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
dc8fd01
Parents:
a49dfb1
git-author:
Sebastian Huber <sebastian.huber@…> (02/08/18 09:47:16)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/08/18 10:20:40)
Message:

Use _Thread_Dispatch_direct()

Use _Thread_Dispatch_direct() for operations that block the executing
thread. This ensures that we get a fatal error
(INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in
an invalid context, e.g. during system start or an interrupt handler.

Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthreadexit.c

    ra49dfb1 red24ed4e  
    3535  _Thread_Exit( executing, THREAD_LIFE_TERMINATING, value_ptr );
    3636
    37   _Thread_Dispatch_enable( cpu_self );
     37  _Thread_Dispatch_direct( cpu_self );
    3838  RTEMS_UNREACHABLE();
    3939}
  • cpukit/posix/src/pthreadjoin.c

    ra49dfb1 red24ed4e  
    7373    );
    7474    _Thread_State_release( the_thread, &queue_context.Lock_context.Lock_context );
    75     _Thread_Dispatch_enable( cpu_self );
     75    _Thread_Dispatch_direct( cpu_self );
    7676  } else {
    7777    _Thread_Join(
  • cpukit/rtems/src/eventseize.c

    ra49dfb1 red24ed4e  
    9797  }
    9898
    99   _Thread_Dispatch_enable( cpu_self );
     99  _Thread_Dispatch_direct( cpu_self );
    100100  return _Status_Get_after_wait( executing );
    101101}
  • cpukit/rtems/src/ratemonperiod.c

    ra49dfb1 red24ed4e  
    8686  _Rate_monotonic_Release( the_period, lock_context );
    8787  _Thread_Priority_update( &queue_context );
    88   _Thread_Dispatch_enable( cpu_self );
     88  _Thread_Dispatch_direct( cpu_self );
    8989}
    9090
     
    264264  }
    265265
    266   _Thread_Dispatch_enable( cpu_self );
     266  _Thread_Dispatch_direct( cpu_self );
    267267  return RTEMS_SUCCESSFUL;
    268268}
  • cpukit/rtems/src/taskmode.c

    ra49dfb1 red24ed4e  
    144144    _Scheduler_Schedule( executing );
    145145    _Thread_State_release( executing, &lock_context );
    146     _Thread_Dispatch_enable( cpu_self );
     146    _Thread_Dispatch_direct( cpu_self );
    147147  }
    148148
  • cpukit/rtems/src/taskwakewhen.c

    ra49dfb1 red24ed4e  
    5959      _Watchdog_Ticks_from_seconds( seconds )
    6060    );
    61   _Thread_Dispatch_enable( cpu_self );
     61  _Thread_Dispatch_direct( cpu_self );
    6262  return RTEMS_SUCCESSFUL;
    6363}
  • cpukit/score/src/threadrestart.c

    ra49dfb1 red24ed4e  
    301301    _Thread_Set_state_locked( executing, STATES_WAITING_FOR_JOIN_AT_EXIT );
    302302    _Thread_State_release( executing, &lock_context );
    303     _Thread_Dispatch_enable( cpu_self );
     303    _Thread_Dispatch_direct( cpu_self );
    304304
    305305    /* Let other threads run */
     
    661661
    662662  _Thread_Priority_update( &queue_context );
    663   _Thread_Dispatch_enable( cpu_self );
     663  _Thread_Dispatch_direct( cpu_self );
    664664  RTEMS_UNREACHABLE();
    665665}
Note: See TracChangeset for help on using the changeset viewer.