Spl (Unix)

Short description: Unix interrupt priority control commands

spl (short for set priority level, after the PDP-11 assembler instruction of the same name[1]) is the name for a collection of Unix kernel routines or macros used to change the interrupt priority level.[2][3] This was historically needed to synchronize critical sections of kernel code that should not be interrupted.[4] Newer Unix variants which support symmetric multiprocessing now mostly use mutexes for this purpose, which is a more general solution, so multiple processors can execute kernel code at the same time.[5][1]

On older PDP-11 versions of Unix, there were eight of these routines, ranging from `spl0` to `spl7`, each corresponding to one PDP-11 interrupt priority level,[3] in addition to `splx`, which restores a previous priority level (returned by one of the other routines).[2] On BSD Unix and its derivatives, these are called `splhigh`, `splserial`, `splsched`, `splclock`, `splstatclock`, `splvm`, `spltty`, `splsofttty`, `splnet`, `splbio`, `splsoftnet`, `splsoftclock`, `spllowersoftclock`, `spl0`, and `splx`.[2]

As of March 2019[update], the spl family of primitives is still heavily used in OpenBSD[6] and NetBSD,[7] which is evidenced by the plentiful calls to `splnet()` within the networking code;[6][7] whereas FreeBSD and DragonFly BSD use more modern concepts; for example, in DragonFly, LWKT tokens may be used in place of spl.

## See also

* IRQL
* Interrupt
* Interrupt priority level
* Programmable Interrupt Controller

## References

1. ↑ 1.0 1.1 Lehey, Greg (2001), Improving the FreeBSD SMP implementation, http://www.lemis.com/grog/SMPng/USENIX/, retrieved 11 May 2018
2. ↑ 2.0 2.1 2.2 "spl(9) - OpenBSD manual pages". https://man.openbsd.org/spl.9.
3. ↑ 3.0 3.1 Lions, John (1976). Lions' Commentary on UNIX 6th Edition, with Source Code. p. 43.
4. ↑ Lions, John (1976). Lions' Commentary on UNIX 6th Edition, with Source Code. p. 41.
5. ↑ McKusick, Marshall Kirk (2004). The Design and Implementation of the FreeBSD Operating System. Addison-Wesley. p. 93.
6. ↑ 6.0 6.1 "/sys/net/if.c". OpenBSD. 2019-03-01. http://bxr.su/o/sys/net/if.c. "s = splnet();"
7. ↑ 7.0 7.1 "/sys/net/if.c". NetBSD. 2019-03-01. http://bxr.su/n/sys/net/if.c. "s = splnet();"

* v
* t
* e

OpenBSD

Operating system|

* OpenBSD
* version history
* security features

Related projects|

* bio
* CARP
* fdm
* LibreSSL
* mandoc
* mg
* OpenBGPD
* OpenIKED
* OpenNTPD
* OpenOSPFD
* OpenSMTPD
* OpenSSH
* PF
* sensors
* sndio
* spamd
* sudo
* tmux
* Xenocara
* cwm

People|

* Theo de Raadt
* Niels Provos

Organizations|

* OpenBSD Foundation

Publications|

* OpenBSD Journal

* v
* t
* e

The NetBSD Project

Operating system|

* NetBSD

Related projects|

* pkgsrc
* ATF
* netpgp
* pcc
* tnftp
* tcsh

Notable subsystems|

* Veriexec
* busdma
* DTrace
* envsys
* LKM
* Rump kernel

File systems and storage|

* bioctl
* CHFS
* disklabel
* fdisk
* LVM2
* PUFFS
* tmpfs
* UFS
* WAPBL
* ZFS

Firewalls and networking|

* 802.11 drivers
* ALTQ
* Bluetooth
* BPF
* IPFilter
* NPF
* PF
* CARP
* pfsync

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Spl (Unix). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Spl_(Unix)&oldid=307333"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template