SysSemTry (FUN)

FUNCTION SysSemTry : RTS_IEC_RESULT

Try to enter the semaphore. If semaphore is available, the function entered the semaphore and returned ERR_OK. If semaphore is not available, ERR_FAILED is returned. The semaphore is identified by its handle.

Note

Function is not blocking instead of SysSemEnter! Function returns immediate with an entered lock (ERR_OK) or without having the lock (ERR_FAILED)!

InOut:

Scope

Name

Type

Comment

Return

SysSemTry

RTS_IEC_RESULT

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

Input

hSem

RTS_IEC_HANDLE

Handle of the semaphore