[kernel] Remove status code from thread exit
The status code from thread exit had too many issues, (eg, how does it relate to process exit code? what happens when different threads exit with different exit codes?) and not enough value, so I'm getting rid of it.
This commit is contained in:
@@ -28,25 +28,25 @@ thread_create(j6_handle_t *self, process *proc, uintptr_t stack_top, uintptr_t e
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_exit(int32_t status)
|
||||
{
|
||||
thread &th = thread::current();
|
||||
log::verbose(logs::task, "Thread %llx exiting with code %d", th.koid(), status);
|
||||
th.exit(status);
|
||||
|
||||
log::error(logs::task, "returned to exit syscall");
|
||||
return j6_err_unexpected;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_kill(thread *self)
|
||||
{
|
||||
log::verbose(logs::task, "Killing thread %llx", self->koid());
|
||||
self->exit(-1);
|
||||
self->exit();
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_exit()
|
||||
{
|
||||
thread &th = thread::current();
|
||||
log::verbose(logs::task, "Thread %llx exiting", th.koid());
|
||||
th.exit();
|
||||
|
||||
log::error(logs::task, "returned to exit syscall");
|
||||
return j6_err_unexpected;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_sleep(uint64_t duration)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user