diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-28 23:07:09 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-28 23:07:09 -0400 |
commit | 1bc9042af8907260659f28e8941837213dd37a8b (patch) | |
tree | 0248ac728085133575d83ebfbcb324408e1de16c /sys/arch/amd64 | |
parent | 31fbb06dc36583823bb07b9a46519e8e65968063 (diff) |
kernel/amd64: Make splraise() return previous IPL
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/intr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c index 3e3f309..c79195d 100644 --- a/sys/arch/amd64/amd64/intr.c +++ b/sys/arch/amd64/amd64/intr.c @@ -38,17 +38,20 @@ static struct intr_entry *intrs[256] = {0}; -void +int splraise(uint8_t s) { struct cpu_info *ci = this_cpu(); + int old_ipl; if (s < ci->ipl) { panic("splraise IPL less than current IPL\n"); } amd64_write_cr8(s); + old_ipl = ci->ipl; ci->ipl = s; + return old_ipl; } void |