QB_RB_CHUNK_READ(3)
π QB_RB_CHUNK_READ π
okay so this lil gem lives in the libqb Programmer's Manual, section 3 (the library-functions girlies, iykyk) π
πΈ NAME πΈ
qb_rb_chunk_read β read the oldest chunk into data_out. that's the whole job, no cap β¨
π SYNOPSIS π
#include <qb/qbrb.h>
ssize_t qb_rb_chunk_read(
qb_ringbuffer_t *rb, /* ringbuffer instance */
void *data_out, /* (in/out) the chunk will be memcpy'ed into this. */
size_t len, /* (in) the size of data_out. */
int32_t ms_timeout /* the amount od time to wait for new data. */
);
π«Ά PARAMS π«Ά
rbβ your ringbuffer instance. the main character of this whole situation πdata_outβ (in/out) the chunk getsmemcpy'ed into this. it's giving "bring your own buffer" fr frlenβ (in) the size ofdata_out. know your limits bestie πms_timeoutβ how long to wait for new data. patience is a virtue, but only for that many ms β³
π DESCRIPTION π
so bestie, this one is literally the same as qb_rb_chunk_peek(), memcpy(), and qb_rb_chunk_reclaim() β the combo meal of ringbuffer reading π like, it peeks at the oldest chunk, copies it into your buffer, and reclaims it. all three vibes, one function call, slay β¨
β RETURN VALUE β
the size of the chunk, or error. periodt π
heads up: if it comes back as an error, that's your signal that something did not go off without a hitch. don't ignore it π¨
π SEE ALSO π
qb_rb_close(3)qb_rb_refcount_get(3)qb_rb_chmod(3)qb_rb_chown(3)qb_rb_open(3)qb_rb_write_to_file(3)qb_rb_create_from_file(3)qb_rb_chunks_used(3)qb_rb_chunk_reclaim(3)qb_rb_space_used(3)qb_rb_chunk_write(3)qb_rb_shared_user_data_get(3)qb_rb_chunk_commit(3)qb_rb_chunk_peek(3)qb_rb_space_free(3)qb_rb_name_get(3)qb_rb_chunk_alloc(3)
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
and that's the whole page, bestie!! π¦ this one's tagged LIBQB, dated 2025-09-16, and yes it still says QB_RB_CHUNK_READ(3) in the corner π go forth and read your chunks, you absolute icon ππ
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms