qthread_sorted_sheps(3)

πŸ“¦ version 1.22^20251007gitcedb1fc, in fedora 43, fedora 44

πŸ’– qthread_sorted_sheps β€” bestie's guide to shepherd distance πŸ’–

okay so you're in libqthread land and you need to know who's near you and who's, like, across the whole entire machine. this is the page for that. welcome. 🫢


✨ NAME ✨

qthread_sorted_sheps, qthread_sorted_sheps_remote β€” returns a list of other shepherds, sorted by their distance

like it literally says on the tin bestie: you get back a lil roster of the other shepherds, ordered from "basically my neighbor" to "we have never met." no cap. πŸ¦‹


✨ SYNOPSIS ✨

#include <qthread.h>

const qthread_shepherd_id_t *
qthread_sorted_sheps (void);

const qthread_shepherd_id_t *
qthread_sorted_sheps_remote (const qthread_shepherd_id_t src);

✨ DESCRIPTION ✨

so this function returns a list of shepherds, sorted by their distance from either the current shepherd or the specified shepherd src. pick your fighter. πŸ’…

the list is an array of qthread_shepherd_id_t objects, and its length is one less than the number of shepherds β€” and that number of shepherds is determined by qthread_num_shepherds(), okay, we're being precise here.

πŸ’€ important: the source shepherd is not included in the list. it's giving "everyone except me." it's not about you. it's about the group chat.
⚠️ and listen, the returned array must not be altered. do not touch. do not edit. do not be that girl. hands off the array, bestie. πŸ™ˆ

✨ RETURN VALUE ✨

these functions will return either a pointer to an array of qthread_shepherd_id_t objects, or NULL if the specified shepherd is either invalid or does not have a specific CPU affinity.

so like. you get the array. or you get NULL. there is no third option, no in-between, no situationship. periodt. πŸ‘‘


anyway that's the whole page, mwah πŸ’– this was the libqthread manual, qthread_sorted_sheps(3), dated APRIL 2011 β€” yeah she's vintage, she's an icon, she ate. go sort some shepherds bestie, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from