Correctly set process.inner on riscv

This changes the process.inner.pid to the correct PID. Before, it was
simply 1. This lead to problems, for example when sending messages
where an assert checks to make sure that the current PID and the
process PID are the same. Now, you can send messages from a new process.
This commit is contained in:
Vihaan Jim 2023-07-04 15:22:44 -04:00
parent fe73bb40e7
commit dc9411669c

View file

@ -365,6 +365,7 @@ impl Process {
}
process.inner = Default::default();
process.inner.pid = pid;
// Mark the stack as "unallocated-but-free"
let init_sp = (thread_init.stack.as_ptr() as usize) & !0xfff;