Write correct value to kernel when exiting thread.

This commit is contained in:
4lDO2
2024-07-15 16:38:53 +02:00
parent 4cb6644181
commit 0b3be2d190
+1 -1
View File
@@ -52,6 +52,6 @@ pub fn exit_this_thread() -> ! {
let thread_fd = RtTcb::current().thread_fd();
// TODO: modify interface so it writes directly to the thread fd?
let status_fd = syscall::dup(**thread_fd, b"status").unwrap();
syscall::write(status_fd, &0_usize.to_ne_bytes()).unwrap();
syscall::write(status_fd, &usize::MAX.to_ne_bytes()).unwrap();
unreachable!()
}