Command disabled: backlink
 
Available Languages?:

OSA : OS_Csem_Signal_Now

OS_Csem_Signal_Now (csem)
OS_Csem_Signal_Now_I (csem)

Increase counting semaohore's value by 1. If counting semaphore already has maximum value, then after execution, the service OS_IsEventError will return true.

OS_ENABLE_CSEM constant must be defined in OSAcfg.h. Size of counting semaphores is defined by OS_CSEM_SIZE constant

For PIC16, counting semaphores can only be allocated in bank0 or bank1

Call allowed:

Not in interrupt

Parameters:

csem Counting semaphore. Variable of OST_CSEM type

Returns:

OS_IsEventError() returns true if counting semaphore already has maximum value

Example:

OST_CSEM csem;
 
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Csem_Signal_Now(csem);
        /*...*/
    }
}

Old style name

OS_SignalCSem

See also

 
en/osa/ref/allservices/os_csem_signal_now.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