Lines Matching refs:st
268 mpsc_daemon_queue_state_t st; in _mpsc_daemon_queue_drain() local
286 st = os_atomic_xor(&dq->mpd_state, in _mpsc_daemon_queue_drain()
288 assert(st & MPSC_QUEUE_STATE_DRAINING); in _mpsc_daemon_queue_drain()
289 if (__improbable(st & MPSC_QUEUE_STATE_WAKEUP)) { in _mpsc_daemon_queue_drain()
290 assert(st & MPSC_QUEUE_STATE_CANCELED); in _mpsc_daemon_queue_drain()
294 os_atomic_dependency_t dep = os_atomic_make_dependency((uintptr_t)st); in _mpsc_daemon_queue_drain()
321 st = os_atomic_andnot(&dq->mpd_state, MPSC_QUEUE_STATE_DRAINING, relaxed); in _mpsc_daemon_queue_drain()
333 if (__improbable(st & MPSC_QUEUE_STATE_WAKEUP)) { in _mpsc_daemon_queue_drain()
342 if (__improbable(st & MPSC_QUEUE_STATE_CANCELED)) { in _mpsc_daemon_queue_drain()
374 mpsc_daemon_queue_state_t st; in _mpsc_daemon_queue_enqueue() local
380 st = os_atomic_or_orig(&dq->mpd_state, MPSC_QUEUE_STATE_WAKEUP, release); in _mpsc_daemon_queue_enqueue()
381 if (__improbable(st & MPSC_QUEUE_STATE_CANCELED)) { in _mpsc_daemon_queue_enqueue()
385 if ((st & (MPSC_QUEUE_STATE_DRAINING | MPSC_QUEUE_STATE_WAKEUP | in _mpsc_daemon_queue_enqueue()
410 mpsc_daemon_queue_state_t st; in mpsc_daemon_queue_activate() local
412 st = os_atomic_andnot_orig(&dq->mpd_state, in mpsc_daemon_queue_activate()
414 if ((st & MPSC_QUEUE_STATE_WAKEUP) && (st & MPSC_QUEUE_STATE_INACTIVE)) { in mpsc_daemon_queue_activate()
422 mpsc_daemon_queue_state_t st; in mpsc_daemon_queue_cancel_and_wait() local
426 st = os_atomic_or_orig(&dq->mpd_state, MPSC_QUEUE_STATE_CANCELED, relaxed); in mpsc_daemon_queue_cancel_and_wait()
427 if (__improbable(st & MPSC_QUEUE_STATE_CANCELED)) { in mpsc_daemon_queue_cancel_and_wait()
428 panic("mpsc_queue[%p]: cancelled twice (%x)", dq, st); in mpsc_daemon_queue_cancel_and_wait()
430 if (__improbable(st & MPSC_QUEUE_STATE_INACTIVE)) { in mpsc_daemon_queue_cancel_and_wait()
431 panic("mpsc_queue[%p]: queue is inactive (%x)", dq, st); in mpsc_daemon_queue_cancel_and_wait()
434 if (dq->mpd_kind == MPSC_QUEUE_KIND_NESTED && st == 0) { in mpsc_daemon_queue_cancel_and_wait()