Task Lock & Task Unlock

Joel Sherrill joel.sherrill at oarcorp.com
Fri Jan 18 22:51:25 UTC 2008


Tim Cussins wrote:
> Hi Andre,
>
> On Fri, 18 Jan 2008 10:23:51 -0300, "Gatti André" <agatti at invap.com.ar>
> said:
>   
>> We need to lock and unlock tasks to avoid task context switching. I
>> didn't see this functionallity in the user_c manual. Is there a way to
>> lock/unlock tasks?
>>
>>     
>
> You can change a tasks mode to RTEMS_NO_PREEMPT. In this case, it can't
> be preempted until it issues a call that blocks, or it explicitly
> yields.
>   
Yep.  Specified at task create or changed dynamically
via the rtems_task_mode call.
> However, if an ISR unblocks a higher priority task, I'm not entirely
> sure what happens on ISR exit...
>
>   
If the currently executing task is not preemptible, then
there is no context switch and you enter a period of
priority inversion.

--joel
> Tim
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list