Spl (Unix)

spl (short for set priority level) is the name for a collection of Unix interrupt priority control commands. The functions include 'splhigh, splserial, splsched, splclock, splstatclock, splvm, spltty, splsofttty, splnet, splbio, splsoftnet, splsoftclock, spllowersoftclock, spl0, splx.

"The naming goes back to the early days of UNIX on the PDP-11. The PDP-11 had a relatively simplistic level-based interrupt structure. When running at a specific level, only higher priority interrupts were allowed. UNIX named functions for setting the interrupt priority level after the PDP-11 SPL instruction, so initially the functions had names like spl4 and spl7. Later machines came out with interrupt masks, and BSD changed the names to more descriptive names such as splbio (for block I/O) and splhigh (block out all interrupts)."
-- Greg Lehey, Improving the FreeBSD SMP implementation, 2001 USENIX Annual Technical Conference - FREENIX

These commands set the interrupt masks, while returning their previous contents. This returned information, can then be used with the splx routine to change the masks back.

External links

This article is issued from Wikipedia - version of the Tuesday, February 17, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.