Home |
RTKernel-32 Programming Manual Function RTKWait |
Function RTKWaitFunction RTKWait retrieves an event from a semaphore: void RTKWait(RTKSemaphore S); ParametersSReferences the semaphore from which to retrieve the event. If no event is available, the calling task is blocked. It can only be reactivated by a different task calling RTKSignal for semaphore S. Any number of tasks can wait for events at a semaphore. The tasks are made ready in sequence of their priorities. If S is an occupied resource or mutex semaphore, the priority of the occupying task is set to the priority of the current task, if this is higher. After the call to RTKWait, the active task occupies or owns the resource or mutex semaphore. It cannot be suspended or terminated until it has released all its resources. Except for event semaphores, RTKWait decrements the semaphore's value on completion of the operation.
|