The following two lines are functional equivalents.
s = splraiseipl(makeiplcookie(IPL_VM));
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);
}