From 108338207b855eb08f72376f746b133e91614dd4 Mon Sep 17 00:00:00 2001
From: Christiano Haesbaert CONVENT
and/or stored. In the case of multithreading, these pointers should not be
accessed if another thread is driving
quark
through
- quark_queue_get_events(3).
+ quark_queue_get_event(3).
BASIC
EBPF programs buffering data-structures and the like. It must be paired with
a quark_queue_close(3) on
exit.
quark_queue_get_event(3) is the main driver of the library, it does the buffering, per-ring scanning, - aggregation and event cache garbage collecting. In case there are no events - it returns zero and the user is expected to call + aggregation and event cache garbage collection. In case there are no events + it returns NULL and the user is expected to call quark_queue_block(3) or equivalent.
@@ -324,24 +324,22 @@quark_queue_get_event(3) is the meat of the library and contains further useful documentation.
quark-mon(8) is the
easiest way to get started with quark
.
November 12, 2024 | +December 1, 2024 | Linux |
October 28, 2024 | +December 1, 2024 | Linux |
October 28, 2024 | +December 1, 2024 | Linux |
October 28, 2024 | +December 1, 2024 | Linux |
quark
through
- quark_queue_get_events(3).
+ quark_queue_get_event(3).
quark_queue_get_event(3) is the main driver of the library, it does the buffering, per-ring scanning, - aggregation and event cache garbage collecting. In case there are no events - it returns zero and the user is expected to call + aggregation and event cache garbage collection. In case there are no events + it returns NULL and the user is expected to call quark_queue_block(3) or equivalent.
quark_queue_get_event(3) is the meat of the library and contains further useful documentation.
quark-mon(8) is the
easiest way to get started with quark
.
November 12, 2024 | +December 1, 2024 | Linux |
September 19, 2024 | +December 1, 2024 | Linux |
October 25, 2024 | +December 1, 2024 | Linux |
quark_queue_block
blocks the calling process until there
would be events to be read with
- quark_queue_get_events(3).
+ quark_queue_get_event(3).
Internally this will call epoll_wait(2) on the descriptor returned by @@ -41,7 +41,7 @@
quark_queue_block
, the caller should call
- quark_queue_get_events(3)
+ quark_queue_get_event(3)
until it returns zero, signifying there are no more events to be read. See
quark(7) for an example.
October 25, 2024 | +December 1, 2024 | Linux |
October 25, 2024 | +December 1, 2024 | Linux |
October 25, 2024 | +December 1, 2024 | Linux |
October 25, 2024 | +December 1, 2024 | Linux |
QUARK_QUEUE_GET_EVENTS(3) | +QUARK_QUEUE_GET_EVENT(3) | Library Functions Manual | -QUARK_QUEUE_GET_EVENTS(3) | +QUARK_QUEUE_GET_EVENT(3) |
quark_queue_get_events
—
+
quark_queue_get_event
—
main quark driver
#include
<quark.h>
int +
const struct quark_event *
- quark_queue_get_events
(struct
- quark_queue *qq, struct
- quark_event *qev, int
- nqev);
quark_queue_get_event
(struct
+ quark_queue *qq);
quark_queue_get_events
fills the array of events pointed
- to by qev to a maximum of neqv
- entries.
+quark_queue_get_event
returns a pointer to the next
+ quark_event, or NULL if there isn't any.
This function is the main driver of quark. Quark doesn't create threads or introduces hidden control flows, all its state is mutated through this function call. For a better explanation of quark's design, refer to @@ -45,10 +42,10 @@
process points to internal data, it +
The returned quark_event pointer as well as
+ the process member point to internal data, they
MUST NOT
- be modified and/or stored. In the case of multithreading, the pointer should
- not be accessed concurrently with another thread which executes
- quark_queue_get_events
.
quark_queue_get_event
.
In other words, read the stuff you want, copy it out, and forget about it.
The number of filled events via qev to a - maximum of nqev. If zero is returned, the user should - consider calling - quark_queue_block(3). In - the case of an internal error, -1 is returned and - errno is set.
+A pointer to quark_event. If there aren't + events, NULL is returned and the user should consider calling + quark_queue_block(3).
November 20, 2024 | +December 1, 2024 | Linux |
October 25, 2024 | +December 1, 2024 | Linux |
QUARK_EV_SNAPSHOT
.
@@ -132,7 +132,7 @@ Events received from the backend are not immediately forwarded to the user, this allows multiple events to be aggregated as well as ordered by time. In case quark is overloaded, it will use a stepping @@ -159,7 +159,7 @@
October 25, 2024 | +December 1, 2024 | Linux |