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