PREEMPT(9)

NAME
preempt - general preempt function

SYNOPSIS
#include <sys/sched.h>
void
preempt(int more);

DESCRIPTION
The preempt() function puts the current process back on the system run queue and performs an involuntary context switch. If the specified argument more is not 0 then a "voluntary" preemption is made, using sa_preempt(). mi_switch(9) is used to select the new process.

The preempt() function must not be called with the scheduler lock held.

SEE ALSO
mi_switch(9), setrunqueue(9), userret(9)