MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bqueue_enqueue_flush

Function bqueue_enqueue_flush

freebsd/contrib/openzfs/module/zfs/bqueue.c:119–123  ·  view source on GitHub ↗

* Enqueue an entry, and then flush the queue. This forces the popping threads * to wake up, even if we're below the fill fraction. We have this in a single * function, rather than having a separate call, because it prevents race * conditions between the enqueuing thread and the dequeueing thread, where the * enqueueing thread will wake up the dequeueing thread, that thread will * destroy th

Source from the content-addressed store, hash-verified

117 * destroy the condvar before the enqueuing thread is done.
118 */
119void
120bqueue_enqueue_flush(bqueue_t *q, void *data, uint64_t item_size)
121{
122 bqueue_enqueue_impl(q, data, item_size, B_TRUE);
123}
124
125/*
126 * Take the first element off of q. If there are no elements on the queue, wait

Callers 7

dmu_recv_streamFunction · 0.85
send_traverse_threadFunction · 0.85
redact_list_threadFunction · 0.85
send_merge_threadFunction · 0.85
send_reader_threadFunction · 0.85
record_merge_enqueueFunction · 0.85
redact_merge_threadFunction · 0.85

Calls 1

bqueue_enqueue_implFunction · 0.85

Tested by

no test coverage detected