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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/io/io.c b/src/kernel/io/io.c
index 803a78a..cd03408 100644
--- a/src/kernel/io/io.c
+++ b/src/kernel/io/io.c
@@ -4,21 +4,21 @@
uint8_t inb(uint16_t port)
{
uint8_t value;
- asm("inb %1, %0" : "=a"(value) : "Nd"(port));
+ asm volatile("inb %1, %0" : "=a"(value) : "Nd"(port));
return value;
}
uint16_t inw(uint16_t port)
{
uint16_t value;
- asm("inw %1, %0" : "=a"(value) : "Nd"(port));
+ asm volatile("inw %1, %0" : "=a"(value) : "Nd"(port));
return value;
}
uint32_t inl(uint16_t port)
{
uint32_t value;
- asm("inl %1, %0" : "=a"(value) : "Nd"(port));
+ asm volatile("inl %1, %0" : "=a"(value) : "Nd"(port));
return value;
}
@@ -39,17 +39,17 @@ void hlt()
void outb(uint16_t port, uint8_t data)
{
- asm("outb %0, %1" ::"a"(data), "Nd"(port));
+ asm volatile("outb %0, %1" ::"a"(data), "Nd"(port));
}
void outw(uint16_t port, uint16_t data)
{
- asm("outw %0, %1" ::"a"(data), "Nd"(port));
+ asm volatile("outw %0, %1" ::"a"(data), "Nd"(port));
}
void outl(uint16_t port, uint32_t data)
{
- asm("outl %0, %1" ::"a"(data), "Nd"(port));
+ asm volatile("outl %0, %1" ::"a"(data), "Nd"(port));
}
void init_serial()