From 975dc11bbf2edfd7f30f98c17f593058368a30c0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 3 May 2021 00:01:49 +0200 Subject: PURE --- kernel/drivers/gdt.c | 2 +- kernel/inc/gdt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/drivers/gdt.c b/kernel/drivers/gdt.c index 693f25f..3e7da94 100644 --- a/kernel/drivers/gdt.c +++ b/kernel/drivers/gdt.c @@ -21,7 +21,7 @@ static struct tss_entry tss = { 0 }; PROTECTED static struct gdt_ptr gp = { 0 }; -CONST u8 gdt_offset(u8 gate) +u8 gdt_offset(u8 gate) { assert(gate && gate < COUNT(gdt)); return ((u32)&gdt[gate] - (u32)gdt) & 0xff; diff --git a/kernel/inc/gdt.h b/kernel/inc/gdt.h index 20261f3..9de0ad3 100644 --- a/kernel/inc/gdt.h +++ b/kernel/inc/gdt.h @@ -61,7 +61,7 @@ struct tss_entry { u16 iomap_base; } PACKED; -u8 gdt_offset(u8 gate); +CONST u8 gdt_offset(u8 gate); void gdt_install(u32 esp); void tss_set_stack(u32 ss, u32 esp); -- cgit v1.2.3