Zero-lock laser gyro 零锁区激光陀螺
If the mutex is currently unlocked you'll get the lock, and this function will return zero.
如果互斥对象当前处于解锁状态,那么您将获得该锁并且函数将返回零。
This routine takes in two arguments, the second being the absolute value of time by which, if the lock could not be acquired, the routine returns with a non-zero status.
这个例程有两个参数,第二个参数是绝对时间值。如果在到达这个时间时还无法获得锁,例程会返回且状态码非零。
And you should never unlock a mutex that you don't hold a lock for (otherwise, the pthread_mutex_unlock call will fail with a non-zero EPERM return value).
并且绝对不要对您未保持锁的互斥对象进行解锁操作(否则,pthread _ mutex_unlock调用将失败并带一个非零的eperm返回值)。
应用推荐