Command disabled: backlink
 
Available Languages?:

OSA : OS_IsInCriticalSection

bool OS_IsInCriticalSection ()

Returns true if program is in critical section.

Call allowed:

Everywhere

Parameters:

None

Returns:

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/allservices/os_isincriticalsection.txt · Last modified: 07.10.2010 13:56 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki