QB_LOG_THR...IORITY_SET(3)

πŸ’– qb_log_thread_priority_set β€” the libqb glow-up for your logging thread πŸ’–

okay bestie, so this is one of those pages from the libqb Programmer's Manual (that's the <rainbow>libqb</rainbow> library, the cute little logging/utilities bestie that a bunch of daemons lean on). And this particular function? It's the one you call when you're doing threaded logging and you want to set the pthread policy and priority. Like, giving your logging thread a whole personality and a little VIP lane. πŸŽ€


✨ NAME ✨

qb_log_thread_priority_set β€” when you're out here using threaded logging, this sets the pthread policy and priority. that's it, that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

#include <qb/qblog.h>

int32_t qb_log_thread_priority_set(
    int32_t  policy,
    int32_t  priority
);

so you pull in <qb/qblog.h>, and you hand it a policy and a priority, both int32_t, and it gives you back an int32_t. two ints in, one int out, no cap. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

okay so real talk β€” the original manpage literally leaves this section empty. like, blank. nothing. a whole heading with no content, which is giving "left as an exercise for the reader" energy. 😭

so we're not gonna invent anything here, because inventing behaviour is not the vibe. the NAME section tells you what it does (sets the pthread policy and priority when you're using threaded logging), and the RETURN VALUE section tells you how it tells you how it went. that's what we've got. periodt. 🫢

ngl, if you want the deep lore on policy and priority values, that's a pthread thing, not a libqb invention β€” go check your system's pthread docs. i'm not out here making stuff up. πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

  • -errno β€” on error. yep, it hands you back a negative errno, so the failure is right there in the sign. πŸ™ˆ
  • 0 β€” success. she ate. πŸ”₯

🌈 SEE ALSO 🌈

the whole girlies-of-libqb squad, in the exact order the page shouts them out:

thirty-one little cross-references, all of them linking to their own pages. iykyk. ⭐


Copyright (c) 2017 Red Hat, Inc.


okay and for the little sign-off moment: this page lives in the libqb manual, and the version/date stamp on it is 2025-09-16. so if you're citing it, that's the receipts. 🫢✨

now go set that thread priority and slay, bestie. πŸ’–

πŸ“¦ where this page comes from