From e5499c8dcbb29c405e551d39856b48b6aa3e91af Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 12 Sep 2021 16:30:04 +0200 Subject: make the inline functions static otherwise this doesn't compile with -O0 --- src/kernel/arch/i386/port_io.h | 4 ++-- src/kernel/arch/i386/registers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/arch/i386') diff --git a/src/kernel/arch/i386/port_io.h b/src/kernel/arch/i386/port_io.h index db755b4..a4d640f 100644 --- a/src/kernel/arch/i386/port_io.h +++ b/src/kernel/arch/i386/port_io.h @@ -1,10 +1,10 @@ #include -inline void port_outb(uint16_t port, uint8_t val) { +static inline void port_outb(uint16_t port, uint8_t val) { asm volatile("outb %0, %1" : : "a" (val), "Nd" (port)); } -inline uint8_t port_inb(uint16_t port) { +static inline uint8_t port_inb(uint16_t port) { uint8_t val; asm volatile("inb %1, %0" : "=a" (val) : "Nd" (port)); return val; diff --git a/src/kernel/arch/i386/registers.h b/src/kernel/arch/i386/registers.h index fb369b7..5443b10 100644 --- a/src/kernel/arch/i386/registers.h +++ b/src/kernel/arch/i386/registers.h @@ -14,7 +14,7 @@ struct registers { } __attribute__((__packed__)); // saves a return value according to the SysV ABI -inline void regs_savereturn(struct registers *regs, uint64_t value) { +static inline void regs_savereturn(struct registers *regs, uint64_t value) { regs->eax = value; regs->edx = value >> 32; } -- cgit v1.2.3