1
0
forked from Rativel/BurritOS

Initialize sp value for each threads (temporary workaround)

This commit is contained in:
Quentin Legot
2023-04-02 19:55:06 +02:00
parent 8239079130
commit 8c844c3e5c
3 changed files with 13 additions and 12 deletions

View File

@@ -47,10 +47,10 @@ impl Thread {
}
}
pub fn init_thread_context(&mut self, initial_pc_reg: u64, initial_sp: i64, arg: i64) {
pub fn init_thread_context(&mut self, initial_pc_reg: u64, initial_sp: u64, arg: i64) {
self.thread_context.pc = initial_pc_reg;
self.thread_context.int_registers[10] = arg;
self.thread_context.int_registers[STACK_REG] = initial_sp;
self.thread_context.int_registers[STACK_REG] = initial_sp as i64;
}
pub fn init_simulator_context(&self, base_stack_addr: [i8; SIMULATORSTACKSIZE]) {