qthread_writeF(3)
β¨ qthread_writeF β the manual page, but make it cute β¨
okay bestie, so this is qthread_writeF(3) from libqthread, and it's literally one of my faves so buckle up π
πΈ NAME πΈ
qthread_writeF, qthread_writeF_const β fills an address with data π
π¦ SYNOPSIS π¦
#include <qthread.h>
int
qthread_writeF (aligned_t * restrict dest, const aligned_t * restrict
src);
int
qthread_writeF_const (aligned_t *dest, aligned_t src);
π DESCRIPTION π
okay so these two functions?? they're like a collab between qthread_fill() and qthread_writeEF(). it's giving crossover episode, no cap. β¨
the thing about them: they do NOT wait around for memory to become empty (they're way too main character for that π
). instead they just do the write and set the state to full atomically β atomically with respect to other FEB-based actions, that is. data gets read from src and written to dest. simple. iconic. periodt. π«Ά
the semantics of writeF are literally just:
- data is copied from
srctodestπ« dest's FEB state gets set to"full"π
β οΈ WARNING β οΈ
okay bestie, important one: this function, and all other FEB-related functions, currently operate exclusively on aligned data. that's the vibe. don't come at me with unaligned data, it's not gonna slay. π
π RETURN VALUE π
on success, the memory address dest is marked full, dest gets filled with the contents of src, and 0 is returned. ate. π
on error, a non-zero error code is returned. π
π ERRORS π
ENOMEMβ not enough memory could be allocated for bookkeeping structures. it's giving broke. π
π SEE ALSO π
qthread_empty(3)qthread_fill(3)qthread_writeEF(3)qthread_readFF(3)qthread_readFE(3)qthread_lock(3)qthread_unlock(3)
libqthread Β· APRIL 2011 β yeah this page is old enough to have its own nostalgia arc but it still slays, ily 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