[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Task Lock & Task Unlock
- Date: Fri, 18 Jan 2008 16:51:25 -0600
- From: joel.sherrill at oarcorp.com (Joel Sherrill)
- Subject: Task Lock & Task Unlock
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
>