SysSemEnter (FUN)

FUNCTION SysSemEnter : RTS_IEC_RESULT

This function must be called before a task accesses data which also are used by other tasks. Thus the data will be bocked for other tasks, which also use SysSemEnter until by function SysSemLeave the semaphore will be set free again. The semaphore is identified by its handle.

InOut:

Scope

Name

Type

Comment

Return

SysSemEnter

RTS_IEC_RESULT

Returns the runtime system error code (see CmpErrors.library)

Input

hSem

RTS_IEC_HANDLE

Handle of the semaphore