1·Unsigned short sem_num; (semaphore number).
unsigned short sem_num;(信号量个数)。
2·This method is called to wait for an event completion on the indicated semaphore, with a specified time.
调用这个方法来等待所需要信号上某个事件的完成,等待指定的一段时间。
3·With a traditional concurrent environment, you might use a solution such as a semaphore that allows processes to determine whether a variable is 'in use' or can be updated.
在传统并行环境中,您可以使用信号量这样的解决方案,允许进程确定一个变量是否 “处于使用中”,还是可更新。
4·Then it atomically decreases the semaphore count.
然后它自动地减少信号的计数值。
5·Usually, the main use of a semaphore is to synchronize a thread?s action with other threads.
通常,信号的主要用途是同步某个线程与其他线程的动作。