qthread_retloc(3)

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

✨ qthread_retloc ✨

okay bestie, welcome to libqthread section 3 β€” this one's a lil three-liner and she is iconic for being exactly what she says on the tin πŸŽ€


🌸 NAME 🌸

qthread_retloc β€” hands you a pointer to your qthread's return location, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qthread.h>

aligned_t *
qthread_retloc (void);

πŸ’– DESCRIPTION πŸ’–

so basically, this function returns the location that the return value of the current thread is gonna get stored into β€” if one has actually been defined. that's it, that's the whole vibe. she's not doing tricks, she's just pointing you at where the good stuff lives 🫢


πŸ‘‘ RETURN VALUE πŸ‘‘

  • Returns a pointer to the location that the thread's return value will be stored in.
  • But listen β€” if the thread's return value is not going to be stored via FEBs</>, this function just returns NULL. no pointer, no location, no drama, just NULL. 😭
fr fr, check for that NULL before you go dereferencing anything, bestie. she will not warn you twice πŸ’€

🌈 SEE ALSO 🌈

go read those too, they're the rest of the friend group ✨


libqthread Β· APRIL 2011 β€” that's the source, the version, and the date all bundled up like a lil time capsule from 2011 πŸŽ€ mwah, thanks for reading, ily, bye πŸ’œπŸ§š

πŸ“¦ where this page comes from