aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/drivers/ide.c2
-rw-r--r--kernel/drivers/pic.c2
-rw-r--r--libs/libc/inc/def.h1
3 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/ide.c b/kernel/drivers/ide.c
index 324b453..64471e7 100644
--- a/kernel/drivers/ide.c
+++ b/kernel/drivers/ide.c
@@ -78,7 +78,7 @@ static void ide_poll(u16 io)
assert(!(inb(io + ATA_REG_STATUS) & ATA_SR_ERR));
}
-static res ata_read(void *buf, u32 lba, u32 sector_count, struct vfs_dev *dev)
+OPTIMIZE("-Ofast") static res ata_read(void *buf, u32 lba, u32 sector_count, struct vfs_dev *dev)
{
u8 drive = ((struct ata_data *)dev->data)->drive;
u16 io = (drive & ATA_PRIMARY << 1) == ATA_PRIMARY ? ATA_PRIMARY_IO : ATA_SECONDARY_IO;
diff --git a/kernel/drivers/pic.c b/kernel/drivers/pic.c
index 55ecfd6..84135d1 100644
--- a/kernel/drivers/pic.c
+++ b/kernel/drivers/pic.c
@@ -17,7 +17,7 @@
#define ICW1_ICW4 0x01
#define ICW1_INIT 0x10
-INLINE void pic_wait(void)
+CLEAR static void pic_wait(void)
{
__asm__ volatile("jmp 1f\n\t"
"1:\n\t"
diff --git a/libs/libc/inc/def.h b/libs/libc/inc/def.h
index 84656b4..0addeb5 100644
--- a/libs/libc/inc/def.h
+++ b/libs/libc/inc/def.h
@@ -69,6 +69,7 @@ typedef long double f80;
#define USED_FUNC ATTR((used))
#define UNUSED_FUNC ATTR((unused))
#define NO_SANITIZE ATTR((no_sanitize("undefined")))
+#define OPTIMIZE(level) ATTR((optimize(level)))
#define ALIGNED(align) ATTR((aligned(align)))
/**