*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> spl (9r)              
Title
Content
Arch
Section
 

spl(9r)

Contents


NAME    [Toc]    [Back]

       spl - General: Sets the processor priority to mask different
 levels of interrupts

SYNOPSIS    [Toc]    [Back]

       #include <machine/cpu.h>

       int getspl(
               void ); int splbio(
               void ); int splclock(
               void ); int spldevhigh(
               void ); int splextreme(
               void ); int splhigh(
               void ); int splimp(
               void ); int splnet(
               void ); int splnone(
               void ); int splsched(
               void ); int splsoftclock(
               void ); int spltty(
               void ); int splvm(
               void ); int splx(
               int x );

ARGUMENTS    [Toc]    [Back]

       Specifies a CPU priority level. This level must be a value
       returned by a previous call to one of the spl routines.

DESCRIPTION    [Toc]    [Back]

       The  operating system  supports the naming of spl routines
       to indicate the associated device types.  Named  spl  routines
 make it easier to determine which routine you should
       use to set the priority level for a given device type. The
       following  table summarizes the uses for the different spl
       routines: Obtains the spl value.  Masks all disk and  tape
       controller  interrupts.   Masks  all hardware clock interrupts.
  Masks all device and software interrupts.   Blocks
       against  all  but  halt  interrupts.  Masks all interrupts
       except for realtime  devices,  machine  checks,  and  halt
       interrupts.  Masks all LAN hardware interrupts.  Masks all
       network software interrupts.  Unmasks (enables) all interrupts.
  Masks all scheduling interrupts (usually the hardware
 clock).  Masks all software clock interrupts.   Masks
       all  tty  (terminal device) interrupts.  Masks all virtual
       memory clock interrupts.  Resets the CPU priority  to  the
       level specified by the argument.

NOTES    [Toc]    [Back]

       The  binding of any spl routine with a specific CPU priority
 level is highly machine dependent. With the exceptions
       of  the  splhigh  and  splnone  routines, knowledge of the
       explicit bindings is not required  to  create  new  device
       drivers.  You  always  use  splhigh  to mask (disable) all
       interrupts and splnone to unmask (enable) all  interrupts.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  each spl routine returns an
       integer value that represents the CPU priority level  that
       existed  before  it was changed by a call to the specified
       spl routine.



EXAMPLE    [Toc]    [Back]

       The following code fragment shows the use of spl  routines
       as part of a disk strategy routine:

       int s;
        .
        .
        .  s = splbio(); /* Mask (disable) all disk interrupts */
        .
        .
        .  [Code to deal with data that can be  modified  by  the
       disk interrupt code]
        .
        .
        .  splx(s); /* Restore CPU priority to what it was */




                                                          spl(9r)
[ Back ]
 Similar pages
Name OS Title
umask Tru64 Sets and gets the value of the file creation mask
pxfumask IRIX Sets the file creation mask
ffs Tru64 General: Finds the first set bit in a mask
umask Tru64 Displays or sets the file mode creation mask
psrset HP-UX create and manage processor sets
kernel_isrthread Tru64 General: Starts a fixed priority kernel thread dedicated to interrupt service
ei IRIX external interrupts interface
VkInterruptDialog IRIX A dialog manager that support interrupts
vm_map_pageable Tru64 General: Sets pageability of the specified address range
thread_set_timeout Tru64 General: Sets a timer for the current kernel thread
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service