5 - IPC - Synchronization - Semaphore - Linux Embedded

Опубликовано: 25 Сентябрь 2026
на канале: vinh pham
35
0

Semaphore Operations
The two main operations that can be performed on a semaphore are:

wait(): This operation decrements the semaphore value. If the semaphore value is zero, the process will block until the semaphore value becomes greater than zero.
post(): This operation increments the semaphore value. If there are any processes blocked on the semaphore, one of them will be unblocked.