SPLRAISEIPL(9)

πŸ“¦ version 11.0, in nixpkgs unstable

🌸 SPLRAISEIPL(9) β€” raise the system priority level 🌸

bestie, welcome to the Kernel Developer's Manual page for SPLRAISEIPL(9). It's giving priority-level realness, no cap. πŸ’…


✨ NAME ✨

splraiseipl β€” raise the system priority level. That's literally the whole name, bestie. πŸ’–


🌸 SYNOPSIS 🌸

#include <sys/intr.h>

int
splraiseipl(ipl_cookie_t icookie);

πŸ’– DESCRIPTION πŸ’–

okay so splraiseipl() raises the system priority level to the level specified by icookie. icookie should be a value returned by makeiplcookie(). 🫢

In general, device drivers should not make use of this interface. To ensure correct synchronization, device drivers should use the condvar(9), mutex(9), and rwlock(9) interfaces. Like, lowkey respect the synchronization besties, fr fr. 😌

See the spl(9) manual page for a description of interrupt priority levels. πŸ‘‘


πŸŽ€ RETURN VALUES πŸŽ€

splraiseipl() returns saved priority level which can be used for splx(). So you get that saved level back, and it's ready for the splx() moment. πŸ’–


πŸ¦‹ EXAMPLES πŸ¦‹

The following two lines are functional equivalents. ✨

s = splraiseipl(makeiplcookie(IPL_VM));

s = splvm();

Because makeiplcookie() can be slow and is not expected to be used in a performance critical path, it's better to do it beforehand. Main character prep energy, honestly. πŸ’…

initialization_code(ipl_t ipl)
{

        ourcookie = makeiplcookie(ipl);
}

performance_critical_code()
{
        int s;

        s = splraiseipl(ourcookie);
        do_something();
        splx(s);
}

🌈 SEE ALSO 🌈


Source/version: Debian Β· Date: July 9, 2015 β€” mwah, bestie πŸ’‹πŸŽ€βœ¨

πŸ“¦ where this page comes from