POSIX_SPAWNATTR_GETSCHEDPARAM(3)

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

πŸ’… POSIX_SPAWNATTR_GETSCHEDPARAM(3) πŸ’…

okay so bestie, this one is from the Library Functions Manual, and it’s all about two lil functions that get and set the spawn-schedparam attribute on a spawn attributes object. Very niche, very scheduler-coded, very β€œtrust me, you need this for posix_spawn” energy. ✨


🌸 NAME 🌸

posix_spawnattr_getschedparam, posix_spawnattr_setschedparam β€” get and set the spawn-schedparam attribute of a spawn attributes object

πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc)

πŸŽ€ SYNOPSIS πŸŽ€

#include <spawn.h>

int
posix_spawnattr_getschedparam(const posix_spawnattr_t *restrict attr,
    struct sched_param *restrict schedparam);

int
posix_spawnattr_setschedparam(posix_spawnattr_t *attr,
    const struct sched_param *restrict schedparam);

✨ DESCRIPTION ✨

The posix_spawnattr_getschedparam() function is the getter bestie: it obtains the value of the spawn-schedparam attribute from the attributes object referenced by attr. πŸ’–

The posix_spawnattr_setschedparam() function is the setter bestie: it sets the spawn-schedparam attribute in an initialized attributes object referenced by attr. 🫢

And what even is the spawn-schedparam attribute? It represents the scheduling parameters that get assigned to the new process image in a spawn operation β€” but only if POSIX_SPAWN_SETSCHEDULER or POSIX_SPAWN_SETSCHEDPARAM is set in the spawn-flags attribute. Yes, that’s the vibe check. Its default value is unspecified, so don’t go assuming anything, bestie. πŸ’…

πŸ’€ RETURN VALUES πŸ’€

The posix_spawnattr_getschedparam() and posix_spawnattr_setschedparam() functions return zero. That’s it. Zero. Both of them. Slay. ✨

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ STANDARDS πŸ‘‘

The posix_spawnattr_getschedparam() and posix_spawnattr_setschedparam() functions conform to IEEE Std 1003.1-2001 (β€œPOSIX.1”). Periodt. 🌈

πŸ¦‹ HISTORY πŸ¦‹

The posix_spawnattr_getschedparam() and posix_spawnattr_setschedparam() functions first appeared in FreeBSD 8.0. Iconic behavior, honestly. πŸ’œ

πŸ“ AUTHORS πŸ“

  • Ed Schouten <ed@FreeBSD.org> β€” yes, the actual author credit, no cap. 😭

This page was brought to you by Debian, dated March 24, 2008. Thanks for coming to my Unix talk. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from