QUARK_QUEUE_BLOCK(3) | Library Functions Manual | QUARK_QUEUE_BLOCK(3) |
quark_queue_block
—
block waiting for quark events
#include
<quark.h>
int
quark_queue_block
(struct
quark_queue *qq);
quark_queue_block
blocks the calling process until there
would be events to be read with
quark_queue_get_events(3).
Internally this will call
epoll_wait(2) on the descriptor
returned by
quark_queue_get_epollfd(3),
the call is also arranged with a reasonable timeout, this is needed because
perf-ring file descriptors only become readable once a certain amount of
data surpasses a threshold. On the return from
quark_queue_block
, the caller should call
quark_queue_get_events(3)
until it returns zero, signifying there are no more events to be read. See
quark(7) for an example.
Zero on success, -1 otherwise and errno is set.
quark_event_dump(3), quark_process_lookup(3), quark_queue_close(3), quark_queue_default_attr(3), quark_queue_get_epollfd(3), quark_queue_get_events(3), quark_queue_get_stats(3), quark_queue_open(3), quark(7), quark-btf(8), quark-mon(8), quark-test(8)
October 25, 2024 | Linux |