qthread_distance(3)
β¨ qthread_distance β¨
okay bestie, welcome to the libqthread manual, and specifically to qthread_distance(3) β the lil function that tells you how far apart your shepherds are living. yes, shepherds. like, the worker threads. we're doing farm-core terminology, it's fine, it's iconic π
πΈ NAME πΈ
qthread_distance β returns the distance between shepherds
π¦ SYNOPSIS π¦
#include <qthread.h>
int
qthread_distance (const qthread_shepherd_id_t src, const
qthread_shepherd_id_t dest);
π DESCRIPTION π
so basically, this function returns the distance from the src shepherd to the memory of the dest shepherd. that's it, that's the whole vibe. you hand her two shepherd ids, she tells you how far apart they're sitting. π«Ά
now here's the tea: those distances are arbitrary. like, they are not a precise latency measurement, no cap. they may not exactly measure latency to memory, but they <em>do</em> give you an indication of relative distance β so it's giving "which one is closer" energy, not "here's the exact nanosecond count" energy. ngl, that's still super useful.
and one more thing, because this part matters: shepherds that do not have a specific CPU affinity can be anywhere. like, truly anywhere, main character roaming privileges. so the distance from or to such shepherds is considered 0. π
π RETURN VALUE π
this function either returns the distance between the two specified shepherds, or β if a shepherd identifier is invalid β it returns QTHREAD_BADARGS. so yeah, if you get that back, one of your ids was not it, bestie π
π SEE ALSO π
and that's the whole page, bestie!! this one came from <strong>libqthread</strong>, dated <strong>APRIL 2011</strong> β yes she's vintage, she's a classic, she's serving archival excellence, and we respect her πβ¨
π¦ 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