INtime SDK Help
AcceptRtControl
INtime SDK v7 > About INtime > INtime Kernel > Regions > AcceptRtControl

Receives ownership of a region object. Ownership occurs only if it ownership is immediately available.

If control is not immediately available, the thread does not wait at the region. Instead, it receives a condition code and remains ready. To gain control, the thread must make repeated calls to AcceptRtControl.

BOOLEAN AcceptRtControl(
    RTHANDLE hRegion
);

Parameters

hRegion
Handle for the region for which ownership is required.

Remarks

If access is not immediately available, the E_BUSY status code returns and the calling thread remains ready.

Threads that use regions cannot be deleted while they control the region. Once a thread controls a region, it should not suspend or delete itself. Doing so locks the region and prevents other threads from gaining access. Relinquish control by invoking ReleaseRtControl.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_BUSY 0x0003
Another thread currently has control of the region.
E_CONTEXT 0x0005
The calling thread currently has access to the specified region.
E_EXIST 0x0006
You used an invalid value for hRegion.
E_TYPE 0x8002
hRegion is not a region handle.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Region system calls, ReleaseRtControl