diff --git a/src/tasking.rs b/src/tasking.rs index d800efd..2a71d7b 100644 --- a/src/tasking.rs +++ b/src/tasking.rs @@ -80,10 +80,6 @@ extern "C" fn task_init() { } } -extern "C" fn task_force_unlock() { - interrupts::enable(); -} - #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum SleepReason { WaitingForIPC, @@ -133,12 +129,9 @@ impl Tasking { arguments: &[&CStr], ) -> Result { let mut kernel_stack = Vec::with_capacity_in(KSTACK_SIZE, &*KERNEL_SPACE); - kernel_stack.resize(KSTACK_SIZE - 0x4, 0); + kernel_stack.resize(KSTACK_SIZE - 0x3, 0); #[expect(clippy::as_conversions, reason = "Needed to get address of function")] - { - kernel_stack.push(task_force_unlock as usize); - kernel_stack.push(task_init as usize); - } + kernel_stack.push(task_init as usize); kernel_stack.push(0xFFF_FF80_0000 + (16 * 4096)); kernel_stack.push(entry_point.expose_provenance()); let mut kernel_stack = kernel_stack.into_boxed_slice(); @@ -192,7 +185,7 @@ impl Tasking { clippy::indexing_slicing, reason = "Stack length is 0x1_0000, this cannot panic" )] - kernel_esp: &mut kernel_stack[KSTACK_SIZE - 10], + kernel_esp: &mut kernel_stack[KSTACK_SIZE - 9], #[expect( clippy::indexing_slicing, reason = "Stack length is 0x1_0000, this cannot panic"