The device state structure for Version 3 of the Quote Of The Day driver contains two new members to help manage thread synchronization:
The lock member is used to acquire and exit mutexes for the current instance of the device. The lock member is an argument to each mutex(9F) function call. The lock member also is an argument to the cv_wait_sig(9F) function call. In the cv_wait_sig(9F) function call, the lock value ensures that the condition will not be changed before the cv_wait_sig(9F) function returns.
The cv member is a condition variable. The cv member is an argument to each condvar(9F) (cv_) function call.