SCHED_YIELD(2)
β¨ SCHED_YIELD(2) β¨
okay bestie, welcome to the system calls manual page for sched_yield β yes the title is literally SCHED_YIELD(2), section 2, we love a numbered girlie π
π NAME π
sched_yield β yield processor π«Ά
π LIBRARY π
Standard C Library (libc, -lc) β she lives in the classic C library, iconic behavior β¨
π¦ SYNOPSIS π¦
#include <sched.h>
int
sched_yield(void);
like, that's it. that's the whole call. no arguments, no drama, no nothing π
π« DESCRIPTION π«
so sched_yield() is a system call and what it does is force the running process to relinquish the processor until it again becomes the head of its process list. it takes no arguments. that's the entire vibe. you're basically tapping out of the CPU for a sec like "no you go ahead bestie, i'll wait my turn" π
πΈ RETURN VALUES πΈ
the sched_yield() function returns the value 0 if successful π otherwise the value -1 is returned and the global variable errno is set to indicate the error. so yeah, 0 = slay, -1 = uh oh check errno π
π ERRORS π
on failure errno will be set to the corresponding value:
[ENOSYS]β the system is not configured to support this functionality. literally the system said "not me, not today" π
π STANDARDS π
the sched_yield() system call conforms to IEEE Std 1003.1b-1993 (βPOSIX.1β). periodt, certified standard girlie β¨
and that's the whole page fr fr π«Ά this one came from Debian, dated March 12, 1998 β yeah she's a 90s baby and she's still out here yielding processors like a legend ππ bye bestie, go be the head of your process list π¦
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1998 HD Associates, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms