POSIX_SPAWNATTR_SETSCHEDPARAM(3)
π 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 π₯
posix_spawn(3)posix_spawnattr_destroy(3)posix_spawnattr_getschedpolicy(3)posix_spawnattr_init(3)posix_spawnattr_setschedpolicy(3)posix_spawnp(3)
π 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
- Copyright (C) 2001-2004 by the Institute of
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms