====== OSA : OS_IsInCriticalSection ====== **bool OS_IsInCriticalSection ()**\\ === === Returns true if program is in critical section. === Call allowed: === Everywhere === Parameters: === None === Returns: === {| class = "fpl" |- |//''false''// | program is not in critical section |- |//''true''// | program is in critical section |} === Example: === void Task (void) { for (;;) { /*...*/ if (!OS_IsInCriticalSection()) { OS_Bsem_Wait(1); // wait for semaphore only when we are not in critical section }; /*...*/ } } === See also === ---- * [[en:osa:ref:services:alphabetical|Alphabetical]] * [[en:osa:ref:services:brieflist|All services]] ~~UP~~