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:
@@ -1,15 +1,14 @@
|
|||||||
/* Big case statement for dispatching syscalls */
|
|
||||||
/*
|
/*
|
||||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2004, Haiku Inc. All rights reserved.
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Big case statement for dispatching syscalls */
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <ksyscalls.h>
|
#include <ksyscalls.h>
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
#include <int.h>
|
#include <int.h>
|
||||||
#include <arch/int.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <vfs.h>
|
#include <vfs.h>
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
@@ -32,6 +31,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <user_atomic.h>
|
#include <user_atomic.h>
|
||||||
#include <safemode.h>
|
#include <safemode.h>
|
||||||
|
#include <arch/system_info.h>
|
||||||
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
@@ -41,6 +41,7 @@ _user_null()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// map to the arch specific call
|
// map to the arch specific call
|
||||||
static inline
|
static inline
|
||||||
int64
|
int64
|
||||||
@@ -49,14 +50,6 @@ _user_restore_signal_frame()
|
|||||||
return arch_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.
|
// TODO: Replace when networking code is added to the build.
|
||||||
static inline
|
static inline
|
||||||
|
|||||||
@@ -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
|
status_t
|
||||||
_user_kill_team(team_id team)
|
_user_kill_team(team_id team)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user