More comments on the ticket lock code
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/** An fair alternative to a bare pthread_mutex_t to prevent starvation*/
|
||||
/** An fair alternative to a bare pthread_mutex_t to prevent starvation.
|
||||
* The members of UCTicketLock must never be accessed directly.
|
||||
*/
|
||||
struct UCTicketLock {
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
Reference in New Issue
Block a user