kernel: hosted: create thread id 1

This ensures that PID1 has a thread ID created as well.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-03-23 21:35:20 +08:00
parent 2a6de6ed67
commit bf3a3879d2

View file

@ -443,6 +443,7 @@ pub fn idle() -> bool {
};
let pid1 = SystemServices::with_mut(|ss| ss.create_process(pid1_init)).unwrap();
assert_eq!(pid1.get(), 1);
let _tid1 = SystemServices::with_mut(|ss| ss.create_thread(pid1, ThreadInit {})).unwrap();
let listen_addr = env::var("XOUS_LISTEN_ADDR")
.map(|s| {