SysSemDelete (FUN) ¶ FUNCTION SysSemDelete : BOOL This function deletes the semaphore which is identified by its handle. InOut: Scope Name Type Comment Return SysSemDelete BOOL Return the runtime system error code (see CmpErrors.library) Input dwHandle DWORD Handle of the semaphore
SysSemEnter (FUN) ¶ FUNCTION SysSemEnter : BOOL 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 BOOL Returns the runtime system error code (see CmpErrors.library) Input dwHandle DWORD Handle of the semaphore
SysSemLeave (FUN) ¶ FUNCTION SysSemLeave : BOOL This function must be called after an access on data which are also used by other tasks. This is necessary to release the semaphore, which has been blocked before the access by function SysSemEnter. The semaphore is identified by its handle. InOut: Scope Name Type Comment Return SysSemLeave BOOL Returns the runtime system error code (see CmpErrors.library) Input dwHandle DWORD Handle of the semaphore
SysSemTry (FUN) ¶ FUNCTION SysSemTry : BOOL 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 BOOL Returns the runtime system error code (see CmpErrors.library) Input dwHandle DWORD Handle of the semaphore
extern30 ¶ GVL (GVL) SysSemCreate30 (Function) SysSemDelete30 (Function) SysSemEnter30 (Function) SysSemLeave30 (Function) SysSemTry30 (Function)
GVL (GVL) ¶ InOut: Scope Name Type Initial Constant SYSSEM_INVALID_HANDLE UDINT 16#FFFFFFFF
SysSem Implementation Library Documentation ¶ Company System Title SysSem Implementation Version 3.5.17.0 Categories System|SysLibs Author CODESYS Development GmbH Placeholder SysSem Implementation Description 1 ¶ Library provides access to operating system semaphores on the runtime system for data synchronization. ATTENTION: Be aware, that a hangup could occur, if your task will be suspended because of a watchdog error in your protected code! Contents: ¶ SysSemCreate (Function) SysSemDelete (Function) SysSemEnter (Function) SysSemLeave (Function) SysSemTry (Function) Indices and tables ¶ 1 Based on SysSem Implementation.library, last modified 20.04.2021, 16:07:18. LibDoc 4.4.0.0-b.27 The content file SysSem Implementation.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 16:07:18.
SysSemCreate (FUN) ¶ FUNCTION SysSemCreate : RTS_IEC_HANDLE This function can be used to create a semaphore (synchronization object). InOut: Scope Name Type Comment Return SysSemCreate RTS_IEC_HANDLE Handle to the semaphore or RTS_INVALID_HANDLE if failed. Input pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSemDelete (FUN) ¶ FUNCTION SysSemDelete : RTS_IEC_RESULT This function deletes the semaphore which is identified by its handle. InOut: Scope Name Type Comment Return SysSemDelete RTS_IEC_RESULT Return the runtime system error code (see CmpErrors.library) Input hSem RTS_IEC_HANDLE Handle of the semaphore
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