1 #include "pthread_impl.h"
4 void __do_private_robust_list()
6 pthread_t self = __pthread_self();
7 volatile void *volatile *p;
8 volatile void *volatile *prev;
9 volatile void *volatile *next;
12 prev = &self->robust_list.head;
13 for (p=self->robust_list.head; p&&p!=&self->robust_list.head; p=next) {
15 m = (void *)((char *)p - offsetof(pthread_mutex_t, _m_next));
16 if (!(m->_m_type & 128)) {
17 int waiters = m->_m_waiters;
19 int cont = a_swap(&m->_m_lock, self->tid|0x40000000);
20 if (cont < 0 || waiters) __wake(&m->_m_lock, 1, 1);
27 int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust)
29 if (robust > 1U) return EINVAL;
31 a->__attr |= robust*4;