-
Notifications
You must be signed in to change notification settings - Fork 2
/
quark_queue_block.3
47 lines (47 loc) · 1.13 KB
/
quark_queue_block.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.Dd $Mdocdate$
.Dt QUARK_QUEUE_BLOCK 3
.Os
.Sh NAME
.Nm quark_queue_block
.Nd block waiting for quark events
.Sh SYNOPSIS
.In quark.h
.Ft int
.Fn quark_queue_block "struct quark_queue *qq"
.Sh DESCRIPTION
.Nm
blocks the calling process until there would be events to be read with
.Xr quark_queue_get_event 3 .
.Pp
Internally this will call
.Xr epoll_wait 2
on the descriptor returned by
.Xr 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
.Nm ,
the caller should call
.Xr quark_queue_get_event 3
until it returns zero, signifying there are no more events to be read.
See
.Xr quark 7
for an example.
.Sh RETURN VALUES
Zero on success, -1 otherwise and
.Va errno
is set.
.Sh SEE ALSO
.Xr quark_event_dump 3 ,
.Xr quark_process_lookup 3 ,
.Xr quark_queue_close 3 ,
.Xr quark_queue_default_attr 3 ,
.Xr quark_queue_get_epollfd 3 ,
.Xr quark_queue_get_event 3 ,
.Xr quark_queue_get_stats 3 ,
.Xr quark_queue_open 3 ,
.Xr quark 7 ,
.Xr quark-btf 8 ,
.Xr quark-mon 8 ,
.Xr quark-test 8