In Linux, the same semget call is used to open the semaphore with 0 as the value for the semflg: int semget (key, nsems, 0). In this code.
在Linux中,可以调用相同的semget来打开某个信号量,不过此时semflg的值为0:int semget (key, nsems, 0)。
This is the code used to create the System V semaphore: int semget (key_t key, int nsems, int semflg). Following are the attributes to this code.
用来创建System v信号量使用的代码是:int semget (key_t key, int nsems, int semflg)。
应用推荐