semid是信号量集的标识符。
semflg是这个新信号量集的权限。
key应该指向想要打开的信号量集的key值。
Key should point to the semaphore set key, which you want to open.
这个函数返回一个信号量集标识符,它与一个参数的键值关联在一起。
This function returns the semaphore set identifier associated with the argument key.
key是一个惟一的标识符,不同的进程使用它来标识这个信号量集。
The key is a unique identifier that is used by different processes to identify this semaphore set.
semflg值是在返回信号量集标识符之前对访问权限进行验证时设置的。
The semflg value is set while creation is verified for the access permissions before returning semaphore set identifier.
要新创建一个信号量集,您可以将使用IPC_CREAT来设置位操作或访问权限。
To create a new set, you can set bit-wise or the access permissions with IPC_CREAT.
调用进程的有效用户ID必须是超级用户,或者可以与该信号量集的创建者或所有者匹配的用户。
The effective user ID of the calling process must be that of the super-user or match the creator or owner of the semaphore set.
这个命令将立即删除信号量集及其数据结构,并唤醒所有正在等待的进程(如果发生错误,则返回,并将errno设置为EIDRM)。
This command immediately removes the semaphore set and its data structures, awakening all waiting processes (with an error return and errno set to EIDRM).
这个命令将立即删除信号量集及其数据结构,并唤醒所有正在等待的进程(如果发生错误,则返回,并将errno设置为EIDRM)。
This command immediately removes the semaphore set and its data structures, awakening all waiting processes (with an error return and errno set to EIDRM).
应用推荐