| SPLRAISEIPL(9) | Kernel Developer's Manual | SPLRAISEIPL(9) |
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.
See the spl(9) manual page for a description of interrupt priority levels.
s = splraiseipl(makeiplcookie(IPL_VM));
s = splvm();
Because makeiplcookie() can be slow and is not expected to be used in a perfomance critical path, it's better to do it beforehand.
initialization_code(ipl_t ipl)
{
ourcookie = makeiplcookie(ipl);
}
performance_critical_code()
{
int s;
s = splraiseipl(ourcookie);
do_something();
splx(s);
}
| February 11, 2007 | NetBSD 7.2 |