added sys_get_current_thread_id() -- for libroot compatibility

some minor rearrangement (sys_xxx() calls now placed together)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1997 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Daniel Reinhold 2002-11-18 02:04:57 +00:00
parent 898852b6b5
commit 715f76df9e

View File

@ -994,17 +994,6 @@ thread_exit(void)
}
void
sys_exit_thread(status_t return_value)
{
struct thread *t = thread_get_current_thread();
t->return_code = return_value;
t->return_flags = THREAD_RETURN_EXIT;
send_signal_etc(t->id, SIGKILLTHR, B_DO_NOT_RESCHEDULE);
}
int
thread_kill_thread(thread_id id)
{
@ -1419,8 +1408,32 @@ setrlimit(int resource, const struct rlimit * rlp)
}
// #pragma mark -
/* user calls */
// Calls from within the kernel
void
sys_exit_thread(status_t return_value)
{
struct thread *t = thread_get_current_thread();
t->return_code = return_value;
t->return_flags = THREAD_RETURN_EXIT;
send_signal_etc(t->id, SIGKILLTHR, B_DO_NOT_RESCHEDULE);
}
thread_id
sys_get_current_thread_id()
{
return thread_get_current_thread()->id;
}
// #pragma mark -
// Calls from userland (with extra address checks)
thread_id