aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/io/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/io/io.c')
-rw-r--r--src/kernel/io/io.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/io/io.c b/src/kernel/io/io.c
index dfd9efa..fd7cd46 100644
--- a/src/kernel/io/io.c
+++ b/src/kernel/io/io.c
@@ -36,6 +36,14 @@ int interrupts_enabled()
return (cpu_flags() & 0x200) == 0x200;
}
+void interrupts_print()
+{
+ if (interrupts_enabled())
+ log(GRN "Interrupts are enabled!" RES);
+ else
+ log(RED "Interrupts are disabled!" RES);
+}
+
void cli()
{
asm volatile("cli");
@@ -66,14 +74,6 @@ void outl(u16 port, u32 data)
asm volatile("outl %0, %1" ::"a"(data), "Nd"(port));
}
-void spinlock(int *ptr)
-{
- int prev;
- do
- asm volatile("lock xchgl %0,%1" : "=a"(prev) : "m"(*ptr), "a"(1));
- while (prev);
-}
-
void init_serial()
{
outb(0x3f8 + 1, 0x00);