Remove unnecessary task_force_unlock

This commit is contained in:
pjht 2024-08-18 15:24:05 -05:00
parent 8b949ba1f1
commit a9fff5e145
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -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<usize, PagingError> {
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"