Support thread.

This commit is contained in:
TXuian
2024-05-19 11:48:43 +08:00
parent 736ba18769
commit 4803239498
17 changed files with 175 additions and 56 deletions
@@ -26,6 +26,11 @@ int spawn(struct Session* session, int fd, ipc_read_fn ipc_read, ipc_fsize_fn ip
return ret;
}
int thread(void* entry, char* name, char** argv)
{
return syscall(SYSCALL_THREAD, (uintptr_t)entry, (uintptr_t)name, (uintptr_t)argv, 0);
}
void exit(int status)
{
syscall(SYSCALL_EXIT, (uintptr_t)status, 0, 0, 0);