Cicode Programming Reference > Cicode Function Categories > Task Functions Introduction > SemSignal

SemSignal

Signals a semaphore. If several Cicode tasks are waiting on this semaphore, the first task is released. This function is a blocking function. It will block the calling Cicode task until the operation is complete.

Note: This function is process-based, not computer-based, and so will only prevent access to a critical section within a single process. This function only works between Cicode tasks within the same process.

Syntax

SemSignal(hSem)

hSem:

The semaphore handle, returned from the SemOpen() function. The semaphore handle identifies the table where all data on the associated semaphore is stored.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

SemClose, SemOpen, SemWait

Example

SemSignal(hSem);

See Also

Task Functions