Searched refs:locks (Results 1 - 1 of 1) sorted by relevance

/libmicro/
H A Dcascade_mutex.c34 * ring. Each thread has two locks of its own on which it blocks, and is able
35 * to manipulate the two locks belonging to the thread which follows it in the
70 static pthread_mutex_t *locks; variable
112 locks = (pthread_mutex_t *)mmap(NULL,
117 if (locks == MAP_FAILED) {
131 (void) pthread_mutex_init(&locks[i], &ma);
140 return (pthread_mutex_lock(&locks[index]) == -1);
146 return (pthread_mutex_unlock(&locks[index]) == -1);
212 /* repeat with locks reversed */

Completed in 6 milliseconds