Add thread and process states.
Add a thread exit call.
This commit is contained in:
parent
8d87791fa2
commit
a06c9dced4
8 changed files with 78 additions and 9 deletions
|
|
@ -56,8 +56,12 @@ void InitSyscall() {
|
|||
extern "C" void SyscallHandler(uint64_t call_id, char* message) {
|
||||
Thread& thread = sched::CurrentThread();
|
||||
switch (call_id) {
|
||||
case Z_THREAD_EXIT:
|
||||
thread.Exit();
|
||||
panic("Returned from thread exit");
|
||||
break;
|
||||
case Z_DEBUG_PRINT:
|
||||
dbgln("[%u.%u] %s", thread.pid(), thread.tid(), message);
|
||||
dbgln("[%u.%u] [Debug] %s", thread.pid(), thread.tid(), message);
|
||||
break;
|
||||
default:
|
||||
panic("Unhandled syscall number: %u", call_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue