Friday, April 20th 2018, 12:30pm UTC+2

You are not logged in.

  • Login
  • Register

mpmcnab

Beginner

Date of registration: Sep 23rd 2009

Posts: 1

1

Thursday, February 6th 2014, 6:08pm

Missing call to LeaveRegion

What happens if the code misses a call to OS_LeaveRegion() and then execeutes an OS_Delay()? Do other tasks execute while this one is in the delay state?

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 266

2

Friday, February 7th 2014, 5:02pm

Hello,

when you call OS_EnterRegion() without OS_EnterLeaveRegion() the region counter is set and preemptive task switches are disabled.
In general cooperative task switches can still happen.
But in case of OS_Delay() which calls internally OS_DelayUntil() the function waits active for the end of the delay when the region counter is set.

So the answer is: No, other tasks will not be executed.

Regards,
Til