what's the meaning of _Thread_Dispatch_disable_level?

Chan Kim ckim at etri.re.kr
Wed Nov 18 12:41:36 UTC 2015


Hi, I was reading some codes and related document on porting but it's difficult to understand.
This seems to be a basics but could somebody please tell me what the _Thread_Dispatch_disable_level means?
From the function below, It seems incrementing that number disables thread dispatch.

RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
  _Thread_Dispatch_increment_disable_level();
  RTEMS_COMPILER_MEMORY_BARRIER();
}

What does it mean to 'dispatch a thread' here? and how is the value _Thread_Dispatch_disable_level used?
(from the code following, I guess it's preventing preemption, but how is setting this value affects the scheduler? the scheduler _Scheduler_Tick() examins this value and doesn't switch task? I guess.. I know disabling interrupt is separate thing.)
Thanks in advance.
Chan


More information about the users mailing list