-
- m->_m_lock = 0;
- if (m->_m_waiters) __wake(&m->_m_lock, 1, 0);
- if (m->_m_type >= 4) self->robust_list.pending = 0;
+ cont = a_swap(&m->_m_lock, 0);
+ if (robust)
+ self->robust_list.pending = 0;
+ if (waiters || cont<0)
+ __wake(&m->_m_lock, 1, 0);