qthread_readstate(3)
π qthread_readstate(3) π
libqthread Β· the lil' introspective queen of the runtime β¨
πΈ NAME πΈ
qthread_readstate β bestie, she returns status information straight from the runtime π«Ά
β¨ SYNOPSIS β¨
#include <qthread.h>
size_t
qthread_readstate (const enum introspective_state type);
π DESCRIPTION π
okay so picture this: this function is literally just the runtime doing a lil' vibe check on itself πͺβ¨. That's it. That's the whole job. The type argument tells her which piece of gossip you wanna hear about, and she hands it over as a size_t.
The valid values of type include, and yes we're going through all of them, no skimming bestie π:
STACK_SIZEβ makes the function return the size of the stack, measured in bytes, that all spawned qthreads receive. every single one. same stack size, no favorites πRUNTIME_DATA_SIZEβ makes the function return the size of the runtime data structure that all spawned qthreads require. the whole squad needs it, so it's giving mandatory πBUSYNESSβ makes the function return the approximate number of threads available in the run queue of the current shepherd. approximate!! don't come for her if it's off by a lil bit πACTIVE_SHEPHERDSβ makes the function return the number of shepherds currently active and scheduling threads. this one is equivalent to callingqthread_num_shepherds(). same energy, different font β¨TOTAL_SHEPHERDSβ makes the function return the total number of shepherds that exist, whether active or inactive. she counts the sleepers too, no one's left out π«ΆACTIVE_WORKERSβ makes the function return the number of worker threads currently active and scheduling threads. this one is equivalent to callingqthread_num_workers()πTOTAL_WORKERSβ makes the function return the total number of worker threads that exist, whether active or inactive. again, sleepers included, everyone gets counted bestie πCURRENT_WORKERβ makes the function return the ID of the current worker on which the task is executing. this one is equivalent to callingqthread_worker(). it's giving main character β it's literally about you ππCURRENT_TEAMβ makes the function return the ID of the calling task's team. this one is equivalent to callingqt_team_id(). know your team, love your team π¦PARENT_TEAMβ makes the function return the ID of the calling task's team's parent-team, if it had one. this one is equivalent to callingqt_team_parent_id(). if your team has no parent, welp, that's a whole different story π
π SEE ALSO π
no cap, that's the whole page β go forth and introspect, bestie π§π
k bye, this was libqthread, APRIL 2011, slay π β¨
π¦ 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