Capitalize namespacing structs

This helps to avoid name clashes when breaking up modules into packages.
This commit is contained in:
josh committed 2023-01-01 17:34:41 -05:00
1 parent a423cdf1b1
commit 25ee1775f0
16 files changed
+86 -86

No files matched your search

+12 -12
View File
@@ -10,7 +10,7 @@ import hulk.console;
import hulk.klog;
import hulk.apic;
struct idt
struct Idt
{
/* The I/O APIC is configured to map IRQ 0 to interrupt 64 (0x40). */
public static enum ulong INT_APIC_BASE = 0x40u; /* IRQ 0 */
@@ -96,7 +96,7 @@ struct idt
((offset & 0xFFFF_0000u) << 32u) |
(dpl << 45u) |
((trap ? 1uL : 0uL) << 40u) |
(gdt.SELECTOR_KERNEL_CODE << 16u) |
(Gdt.SELECTOR_KERNEL_CODE << 16u) |
(offset & 0xFFFFu);
idt[index][1] = offset >> 32u;
}
@@ -104,25 +104,25 @@ struct idt
public extern(C) void isr(ulong vector, ulong arg)
{
if ((vector >= idt.INT_APIC_BASE) && (vector < (idt.INT_APIC_BASE + idt.INT_APIC_COUNT)))
if ((vector >= Idt.INT_APIC_BASE) && (vector < (Idt.INT_APIC_BASE + Idt.INT_APIC_COUNT)))
{
apic.isr(vector);
Apic.isr(vector);
}
else
{
switch (vector)
{
case idt.INT_APIC_TIMER:
case idt.INT_APIC_LINT0:
case idt.INT_APIC_LINT1:
case idt.INT_APIC_SPURIOUS:
apic.isr(vector);
case Idt.INT_APIC_TIMER:
case Idt.INT_APIC_LINT0:
case Idt.INT_APIC_LINT1:
case Idt.INT_APIC_SPURIOUS:
Apic.isr(vector);
break;
default:
console.clear();
fb.clear(0xFF8000u);
klog.writefln("ISR %u, 0x%x", vector, arg);
Console.clear();
Fb.clear(0xFF8000u);
Klog.writefln("ISR %u, 0x%x", vector, arg);
__asm("cli", "");
for (;;)
{