diff --git a/src/kernel/core/syscalls.c b/src/kernel/core/syscalls.c index d7bee88845..57b2c53fe6 100644 --- a/src/kernel/core/syscalls.c +++ b/src/kernel/core/syscalls.c @@ -1,15 +1,14 @@ -/* Big case statement for dispatching syscalls */ /* -** Copyright 2001, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ + * Copyright 2004, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. + */ +/* Big case statement for dispatching syscalls */ #include #include #include #include -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include static inline @@ -41,6 +41,7 @@ _user_null() return 0; } + // map to the arch specific call static inline int64 @@ -49,14 +50,6 @@ _user_restore_signal_frame() return arch_restore_signal_frame(); } -// XXX: _kern_exit() was formerly mapped to _user_exit_thread(). That's -// probably not correct. -static inline -void -_user_exit(int returnCode) -{ - _user_exit_thread(returnCode); -} // TODO: Replace when networking code is added to the build. static inline diff --git a/src/kernel/core/team.c b/src/kernel/core/team.c index 39fd0894da..91ac8e79bc 100644 --- a/src/kernel/core/team.c +++ b/src/kernel/core/team.c @@ -2246,6 +2246,18 @@ _user_load_image(int32 argCount, const char **userArgs, int32 envCount, } +void +_user_exit_team(status_t returnValue) +{ + struct thread *thread = thread_get_current_thread(); + + thread->exit.status = returnValue; + thread->exit.reason = THREAD_RETURN_EXIT; + + send_signal(thread->id, SIGKILL); +} + + status_t _user_kill_team(team_id team) {