PREEMPT(9)
๐ PREEMPT(9) โ Kernel Developerโs Manual energy ๐
okay so this page is literally named preempt, and itโs from the Kernel Developerโs Manual. Weโre talking general preempt and yield functions, bestie. ๐ซถ
โจ NAME โจ
preempt, yield โ general preempt and yield functions
๐ SYNOPSIS ๐
#include <sys/sched.h>
void
preempt(void);
#include <sys/proc.h>
void
yield(void);
๐ธ DESCRIPTION ๐ธ
So preempt() takes the current LWP and puts it back on the system run queue, then performs an involuntary context switch. Thatโs the whole flex. ๐
yield() is mostly the same as preempt() โ the key difference is that it performs a voluntary context switch. Yes bestie, voluntary vs. involuntary is the vibe check here. โจ
Both of these functions drop the kernel lock before switching, and they re-acquire it before returning. no cap. ๐ฅ
okay thatโs the page, bestie ๐ซถ โ source/version is Debian, the date is July 3, 2007, and the manual slot is literally PREEMPT(9). periodt ๐
๐ฆ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2002 The NetBSD Foundation, Inc
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms