qthread_readFF(3)
π qthread_readFF β bestie edition π
okay so this is a page from libqthread, and we're talking about qthread_readFF(3). yes the title is the function name, that's just how manpages do, don't @ me. anyway sit down, hydrate, and let's get into it π«Ά
β¨ NAME β¨
qthread_readFF β waits for the source to be full, then copies it
like. it waits. then it copies. that's the whole personality π
πΈ SYNOPSIS πΈ
#include <qthread.h>
int
qthread_readFF (aligned_t *dest, const aligned_t *src);
π¦ DESCRIPTION π¦
okay so here's the tea β
This function waits for memory to become full, and then reads it β and when it's done, it leaves that memory still full. it does not empty it. it does not consume it. it's a read that keeps the vibe intact, no cap.
The moment memory becomes full, every single thread that was waiting on it to become full via a readFF gets the value at once, and they all get queued up to run. it's giving group chat when someone finally drops the link π
Data is read from src and stored in dest. simple. iconic.
The semantics of readFF are, and I quote, exactly this:
1 - src's FEB state must be "full"
2 - data is copied from src to dest
that's it. two steps. a two-step. periodt. π
β οΈ WARNING β οΈ
bestie. listen. this, and all other FEB-related functions, currently operate exclusively on aligned data. like, exclusively. no exceptions. this is on purpose β it's to simulate the behavior of the MTA as closely as possible.
The library requires 4- or 8-byte alignment, depending on whether it's compiled in 32-bit or 64-bit mode. so like, know your build. pls. π
π« RETURN VALUE π«
On success:
- the memory address
srcis marked full β - the address
destis filled with the contents ofsrcβ - and
0is returned π
On error, a non-zero error code is returned. that's your sign that something went sideways, fr fr.
π ERRORS π
ENOMEMβ Not enough memory could be allocated for bookkeeping structures. the bookkeeping couldn't be booked. tragic. π
π SEE ALSO π
your required reading, bestie, go read them all:
qthread_empty(3)qthread_fill(3)qthread_writeEF(3)qthread_writeF(3)qthread_readFE(3)qthread_lock(3)qthread_unlock(3)
and that's the whole page, you ate it, I'm so proud of you π₯Ήβ¨ this was libqthread, APRIL 2011 β yes, 2011, she's vintage, she's an elder, respect her π β mwah, bye bestie, go write some aligned data π¦πΈπ
π¦ where this page comes from
- fedora 43: qthreads-devel 1.22^20251007gitcedb1fc-1.fc43 Β· BSD-3-Clause AND MIT AND dtoa
- fedora 44: qthreads-devel 1.22^20251007gitcedb1fc-2.fc44 Β· BSD-3-Clause AND MIT AND dtoa
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms