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。
To wait on an event, semop() function is used with sem_op value as -1 thus blocking the calling process until it is signaled.
要等待某个事件,则可以使用 semop()函数,并将 sem_op 的值设置为-1,这样就可以阻塞调用进程,直到它变为有信号状态为止。
The function semop performs a set of operations contained in sops atomically (all operations performed at the same time only if they can be performed at the same time).
函数semop原子地执行sops中包含的一组操作(只在所有操作都可以同时成功执行时,才会将所有的操作同时一次执行完)。
The function semop performs a set of operations contained in sops atomically (all operations performed at the same time only if they can be performed at the same time).
函数semop原子地执行sops中包含的一组操作(只在所有操作都可以同时成功执行时,才会将所有的操作同时一次执行完)。
应用推荐