Removed broken _user_exit(), and implemented working _user_exit_team().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10328 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-12-01 04:26:10 +00:00
parent 71463c834e
commit 26a78aa41d
2 changed files with 18 additions and 13 deletions
+6 -13
View File
@@ -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 <kernel.h>
#include <ksyscalls.h>
#include <syscalls.h>
#include <int.h>
#include <arch/int.h>
#include <debug.h>
#include <vfs.h>
#include <thread.h>
@@ -32,6 +31,7 @@
#include <sys/socket.h>
#include <user_atomic.h>
#include <safemode.h>
#include <arch/system_info.h>
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
+12
View File
@@ -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)
{