Does one of these:
DWORD WaitForRtSemaphore(
RTHANDLE hSemaphore, // handle for RT semaphore
WORD wCount, // number of units to wait for
DWORD dwMilliseconds // number of milliseconds to wait for units
);
hSemaphorewCount0 (zero).dwMillisecondsNO_WAIT |
The thread does not wait. |
WAIT_FOREVER |
The thread waits for its request to be fully satisfied. |
1-655349 |
Calling thread goes to sleep for this many milliseconds, after which it awakes.
Note: The kernel converts milliseconds to high-level ticks. |
You can specify the amount of time a thread that uses WaitForRtSemaphore waits for a semaphore unit. Two factors determine whether the thread receives the units and how soon: how many units the thread asks for, and where the thread is in the queue.
E_LIMIT status code.WAIT_FAILEDE_OK 0x0000E_TIME 0x0001dwMilliseconds.E_LIMIT 0x0004wCount contains a value greater than the maximum value specified for the semaphore when it was created.E_EXIST 0x0006hSemaphore.E_TYPE 0x8002hSemaphore requires an RT handle for a semaphore.E_PARAM 0x8004dwMilliseconds contains an invalid value.E_INVALID_ADDRESS 0x00E2| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |