man.bsd.lv manual page server

Manual Page Search Parameters

PREEMPT(9) Kernel Developer's Manual PREEMPT(9)

preempt, yieldgeneral preempt and yield functions

#include <sys/sched.h>

void
preempt(void);

#include <sys/proc.h>

void
yield(void);

The () function puts the current LWP back on the system run queue and performs an involuntary context switch. The () function is mostly same as preempt(), except that it performs a voluntary context switch.

These functions drop the kernel lock before switching and re-acquire it before returning.

July 3, 2007 NetBSD-9.2