POSIX_SPAWNATTR_GETSCHEDPOLICY(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

hey bestie πŸ’– you've landed on POSIX_SPAWNATTR_GETSCHED(3) from the Library Functions Manual, and it's lowkey iconic: this page is all about getting and setting the spawn-schedpolicy attribute of a spawn attributes object. no cap, it's giving scheduler-nerd realness and i'm here for it.

πŸ’– NAME πŸ’–

  • posix_spawnattr_getschedpolicy
  • posix_spawnattr_setschedpolicy

these two besties get and set the spawn-schedpolicy attribute of a spawn attributes object. that's the whole vibe. ✨

πŸ¦‹ LIBRARY πŸ¦‹

Standard C Library (libc, -lc) β€” yup, that's where these functions live, bestie.

✨ SYNOPSIS ✨

#include <spawn.h>

int
posix_spawnattr_getschedpolicy(const posix_spawnattr_t *restrict attr,
    int *restrict schedpolicy);

int
posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr,
    int schedpolicy);

🌸 DESCRIPTION 🌸

so posix_spawnattr_getschedpolicy() is the getter gf: she obtains the value of the spawn-schedpolicy attribute from the attributes object referenced by attr. she's not messy, she just reads the vibe and reports back. 🫢

then posix_spawnattr_setschedpolicy() is the setter bf: he sets the spawn-schedpolicy attribute in an initialized attributes object referenced by attr. key word: initialized, bestie β€” don't come at him with an uninitialized object and expect magic. πŸ’…

the spawn-schedpolicy attribute represents the scheduling policy that's going to be assigned to the new process image in a spawn operation β€” but only if POSIX_SPAWN_SETSCHEDULER is set in the spawn-flags attribute. so like, it's conditional slay. the default value of this attribute is unspecified, which is the manpage way of saying "we're not telling, go check your implementation." πŸ’€

πŸŽ€ RETURN VALUES πŸŽ€

both posix_spawnattr_getschedpolicy() and posix_spawnattr_setschedpolicy() return zero. that's it. that's the whole return value. zero. no drama, no surprises, just zero. periodt. πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

go read these if you want the full spawn-attributes cinematic universe. iykyk. πŸ‘‘

πŸ‘‘ STANDARDS πŸ‘‘

posix_spawnattr_getschedpolicy() and posix_spawnattr_setschedpolicy() conform to IEEE Std 1003.1-2001 (β€œPOSIX.1”). standards queen behavior, honestly. 🌈

🌈 HISTORY 🌈

these two functions first appeared in FreeBSD 8.0. so they've been serving since way back. vintage but still relevant, like a good pair of low-rise jeans. πŸ¦‹

πŸ’œ AUTHORS πŸ’œ

Ed Schouten <ed@FreeBSD.org> β€” thank you for your service, king. πŸ«‘πŸ’œ


mwah πŸ’‹ β€” this page is from Debian, dated March 24, 200, and the footer's manual-name energy is POSIX_SPAWNATTR_GETSCHEDPOLICY(3). periodt. 🫢

πŸ“¦ where this page comes from