pass flags from device close to l_close
[unix-history] / usr / src / sys / tahoe / include / spl.c
CommitLineData
ca9f9108 1/* spl.c 1.2 85/07/29 */
f3715d07 2
ca9f9108 3#include "../tahoe/mtpr.h"
f3715d07
SL
4
5spl0()
6{
7 register int oldipl;
8
9 oldipl = mfpr(IPL);
ca9f9108 10 mtpr(IPL, 0);
f3715d07
SL
11 return (oldipl);
12}
13
14spl1()
15{
16 register int oldipl;
17
18 oldipl = mfpr(IPL);
ca9f9108 19 mtpr(IPL, 1);
f3715d07
SL
20 return (oldipl);
21}
22
23splnet()
24{
25 register int oldipl;
26
27 oldipl = mfpr(IPL);
ca9f9108 28 mtpr(IPL, 0xC);
f3715d07
SL
29 return (oldipl);
30}
31
32spl8()
33{
34 register int oldipl;
35
36 oldipl = mfpr(IPL);
ca9f9108 37 mtpr(IPL, 0x10+8);
f3715d07
SL
38 return (oldipl);
39}
40
41#ifdef notdef /* use splx() instead */
42spl5()
43{
44 register int oldipl;
45
46 oldipl = mfpr(IPL);
ca9f9108 47 mtpr(IPL, 0x10+5);
f3715d07
SL
48 return (oldipl);
49}
50
51spl4()
52{
53 register int oldipl;
54
55 oldipl = mfpr(IPL);
ca9f9108 56 mtpr(IPL, 0x10+4);
f3715d07
SL
57 return (oldipl);
58}
59
60spl6()
61{
62 register int oldipl;
63
64 oldipl = mfpr(IPL);
ca9f9108 65 mtpr(IPL, 0x10+6);
f3715d07
SL
66 return (oldipl);
67}
68#endif
69
70splimp()
71{
72 register int oldipl;
73
74 oldipl = mfpr(IPL);
ca9f9108 75 mtpr(IPL, 0x10+8);
f3715d07
SL
76 return (oldipl);
77}
78
79splsoftclock()
80{
81 register int oldipl;
82
83 oldipl = mfpr(IPL);
ca9f9108 84 mtpr(IPL, 8);
f3715d07
SL
85 return (oldipl);
86}
87
88splx(oldipl)
89 int oldipl;
90{
91
ca9f9108 92 mtpr(IPL, oldipl);
f3715d07 93}