diff --git a/kernel/src/holeybytes/kernel_services/service_definition_service.rs b/kernel/src/holeybytes/kernel_services/service_definition_service.rs index a7497bc..02f7c3a 100644 --- a/kernel/src/holeybytes/kernel_services/service_definition_service.rs +++ b/kernel/src/holeybytes/kernel_services/service_definition_service.rs @@ -7,7 +7,7 @@ use { }, alloc::string::String, hashbrown::HashMap, - log::info, + log::{info, trace}, spin::{lazy::Lazy, Mutex}, }; pub struct Services(HashMap); diff --git a/sysdata/programs/serial_driver/README.md b/sysdata/programs/a_serial_driver/README.md similarity index 100% rename from sysdata/programs/serial_driver/README.md rename to sysdata/programs/a_serial_driver/README.md diff --git a/sysdata/programs/serial_driver/meta.toml b/sysdata/programs/a_serial_driver/meta.toml similarity index 84% rename from sysdata/programs/serial_driver/meta.toml rename to sysdata/programs/a_serial_driver/meta.toml index 33de705..812e297 100644 --- a/sysdata/programs/serial_driver/meta.toml +++ b/sysdata/programs/a_serial_driver/meta.toml @@ -1,5 +1,5 @@ [package] -name = "serial_driver" +name = "a_serial_driver" authors = ["Able"] [dependants.libraries] diff --git a/sysdata/programs/serial_driver/src/main.hb b/sysdata/programs/a_serial_driver/src/main.hb similarity index 91% rename from sysdata/programs/serial_driver/src/main.hb rename to sysdata/programs/a_serial_driver/src/main.hb index c4854b2..80f877f 100644 --- a/sysdata/programs/serial_driver/src/main.hb +++ b/sysdata/programs/a_serial_driver/src/main.hb @@ -19,11 +19,13 @@ serial_println := fn(ptr: ^u8): void { } main := fn(): int { - serial_println("Starting Serial Driver.\0") - // Note that the first byte is reserved, pad accordingly. + // This must be done first and foremost to prevent racing a := buffer.create("XNumber\0") + serial_println("Starting Serial Driver.\0") + + // Note that the first byte is reserved, pad accordingly. b := buffer.search("XNumber\0") - + if a == b { serial_println("Stopping Serial Driver.\0") } diff --git a/sysdata/programs/diskio_driver/src/main.hb b/sysdata/programs/diskio_driver/src/main.hb index a90be03..f8c3517 100644 --- a/sysdata/programs/diskio_driver/src/main.hb +++ b/sysdata/programs/diskio_driver/src/main.hb @@ -8,5 +8,7 @@ main := fn(): int { a := memory.inb(0, 70) b := memory.inb(0, 71) + c := buffer.search("XNumber\0") + return 0 } \ No newline at end of file diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index 624b1ed..f724270 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -19,8 +19,8 @@ resolution = "1024x768x24" # [boot.limine.ableos.modules.tests] # path = "boot:///tests.hbf" -[boot.limine.ableos.modules.serial_driver] -path = "boot:///serial_driver.hbf" +[boot.limine.ableos.modules.a_serial_driver] +path = "boot:///a_serial_driver.hbf" [boot.limine.ableos.modules.diskio_driver]