Skip to content

Commit

Permalink
refactor: move gdt.rs to arch/x86 and expose only set_gdt
Browse files Browse the repository at this point in the history
  • Loading branch information
winstonallo committed Mar 2, 2025
1 parent dacbf76 commit 9801d4c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 117 deletions.
1 change: 1 addition & 0 deletions src/arch/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod x86;
File renamed without changes.
3 changes: 3 additions & 0 deletions src/arch/x86/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod gdt;

pub use gdt::set_gdt;
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
#![no_std]
use gdt::set_gdt;
use terminal::SCREEN;

mod arch;
mod conv;
mod gdt;
mod panic;
mod print;
mod printk;
mod shell;
mod terminal;

#[no_mangle]
pub extern "C" fn kernel_main() {
set_gdt();
arch::x86::set_gdt();
#[allow(static_mut_refs)]
shell::launch(unsafe { &mut SCREEN });
}
113 changes: 0 additions & 113 deletions src/print.rs

This file was deleted.

0 comments on commit 9801d4c

Please sign in to comment.