To signal an event, semop is used with sem_op value as 1.
要将某个事件的状态修改为有信号状态,可以使用semop,并将sem_op的值设置为1。
If sem_op is set to 0, semop will wait for semval to become 0.
如果sem_op被设置为0,那么semop就会等待semval变成0。
After using the Shared resource, the semaphore count can be set to 1 by using semop .
在使用完共享资源之后,可以使用semop将信号量计数设置为1。
应用推荐