An item used to arbitrate access to shared resources.
Semaphores are used to protect shared resources. Before accessing a shared resource, a task must first try to lock the associated semaphore. Only one task at a time can have the semaphore locked at any one moment. This prevents multiple tasks from accessing the same data at the same time.
kernel
SEMA4NODE
CreateSemaphore
(), CreateItem()
''%%LockSemaphore%%''(), UnlockSemaphore(), LockItem(), UnlockItem()