diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-31 00:44:03 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-31 00:44:03 -0500 |
commit | 7a0025ab97c42dfa350afbe4d545088c6e16a95a (patch) | |
tree | 097b5c23c84274f02127f27b4058b3754786b0b7 /kernel/include/boot/gdt.h | |
parent | d887eda7e07ec0659d2eae956a550249f52f991d (diff) |
boot: GDT: C->C++
Diffstat (limited to 'kernel/include/boot/gdt.h')
-rw-r--r-- | kernel/include/boot/gdt.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/kernel/include/boot/gdt.h b/kernel/include/boot/gdt.h index 607b4e8..ff87981 100644 --- a/kernel/include/boot/gdt.h +++ b/kernel/include/boot/gdt.h @@ -87,9 +87,8 @@ ((base >> 24) & 0xff) /* base_high */ \ } -#ifdef __cplusplus -extern "C" { -#endif +namespace GDT +{ typedef struct { uint16_t limit_low; @@ -98,18 +97,16 @@ typedef struct { uint8_t access_flags; uint8_t flags_limit_high; uint8_t base_high; -} PACKED GDT_entry_t; +} PACKED entry_t; typedef struct { - uint16_t limit; /* sizeof(GDT) - 1 */ - GDT_entry_t *ptr; /* Address of GDT */ -} PACKED GDT_descriptor_t; + uint16_t limit; /* sizeof(GDT) - 1 */ + entry_t *ptr; /* Address of GDT */ +} PACKED descriptor_t; -extern void _GDT_flush(GDT_descriptor_t *GDT_descriptor); -void GDT_load(void); +extern "C" void _GDT_flush(descriptor_t *descriptor); +void load(void); -#ifdef __cplusplus } -#endif #endif |