what's the meaning of _Thread_Dispatch_disable_level?

Chan Kim ckim at etri.re.kr
Thu Nov 19 00:35:55 UTC 2015


OK, that helps a lot. Thanks again!
Chan



보낸 사람 : "Gedare Bloom" <gedare at rtems.org>
보낸 날짜 : 2015-11-19 00:23:02 ( +09:00 )
받는 사람 : 김찬 <ckim at etri.re.kr>
참조 : users at rtems.org <users at rtems.org>
제목 : Re: what's the meaning of _Thread_Dispatch_disable_level?

I guess you are reading about porting RTEMS to different
architectures? The _Thread_Dispatch_disable_level is an internal RTEMS
variable that is used to prevent the kernel from switching to a new
thread. Usually it is checked during interrupt handling, which can
otherwise switch the executing thread when the ISR terminates.

On Wed, Nov 18, 2015 at 7:41 AM, Chan Kim wrote:
>
> 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
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list