unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Page:
Section:
Apropos / Subsearch:
optional field

SCHED_LOCK(9)            BSD Kernel Developer's Manual           SCHED_LOCK(9)

NAME
     SCHED_LOCK, SCHED_UNLOCK, sched_lock_idle, sched_unlock_idle -- scheduler
     lock operations

SYNOPSIS
     #include <&lt;sys/sched.h>&gt;

     void
     sched_lock_idle(void);

     void
     sched_unlock_idle(void);

     int
     SCHED_LOCK(void);

     void
     SCHED_UNLOCK(int s);

DESCRIPTION
     Access to the system run queue within the scheduler is protected by the
     sched_lock simplelock and the splsched(9) interrupt priority level.  The
     sched_lock_idle() and sched_unlock_idle() are simple functions without
     arguments which can be called easily from machine-dependent assembler
     routines (such as from cpu_idle(9)) to lock and unlock the scheduler.
     The macros SCHED_LOCK() and SCHED_UNLOCK() provide a simple interface for
     machine-independent routines to simultaneously acquire sched_lock and
     raise the interrupt priority level to splsched(9).  SCHED_LOCK() returns
     the current interrupt priority level which is later passed to
     SCHED_UNLOCK() when the scheduler lock is released.

SEE ALSO
     scheduler(9), splsched(9)

BSD                           September 21, 2002                           BSD