Gains ownership of a region. This function blocks until the current owner gives up the region.
WaitForRtControl enables a thread to wait until a region becomes available. If access does not become available, the thread never runs again. An error occurs if a thread requests control of a region it already controls.
BOOLEAN WaitForRtControl( RTHANDLE hRegion );
hRegion
If no thread currently has control of the specified region, entry is immediate. If another thread currently has control, the calling thread enters the region's thread queue and goes to sleep. The thread remains asleep until it receives control of the specified region.
If the region has a priority-based thread queue, the priority of the thread currently having control is temporarily boosted, if necessary, to match that of the thread at the head of the queue.
TRUE
FALSE
E_OK 0x0000
E_CONTEXT 0x0005
hRegion
specifies a region already accessed by the calling thread.
E_EXIST 0x0006
hRegion
.
E_TYPE 0x8002
hRegion
is not a region handle. Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |