Added syscall for rename_thread(), courtesy of Jack Burton.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7631 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-05-24 12:12:58 +00:00
parent 9b167d37f1
commit 0865e4b204
6 changed files with 9 additions and 3 deletions

View File

@ -150,6 +150,7 @@ enum {
SYSCALL_SET_REAL_TIME_CLOCK,
SYSCALL_DEBUG_OUTPUT,
SYSCALL_GET_SYSTEM_INFO, /* 140 */
SYSCALL_RENAME_THREAD
};
int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret);

View File

@ -51,6 +51,7 @@ extern thread_id _kern_spawn_thread(int32 (*func)(thread_func, void *), const ch
extern thread_id _kern_find_thread(const char *name);
extern status_t _kern_suspend_thread(thread_id thread);
extern status_t _kern_resume_thread(thread_id thread);
extern status_t _kern_rename_thread(thread_id thread, const char *newName);
extern status_t _kern_set_thread_priority(thread_id thread, int32 newPriority);
extern status_t _kern_kill_thread(thread_id thread);
extern void _kern_exit_thread(status_t returnValue);

View File

@ -57,6 +57,7 @@ status_t _user_set_thread_priority(thread_id thread, int32 newPriority);
status_t _user_rename_thread(thread_id thread, const char *name);
status_t _user_suspend_thread(thread_id thread);
status_t _user_resume_thread(thread_id thread);
status_t _user_rename_thread(thread_id thread, const char *name);
thread_id _user_spawn_thread(thread_func func, const char *name, int32 priority, void *arg1, void *arg2);
status_t _user_wait_for_thread(thread_id id, status_t *_returnCode);
status_t _user_snooze_etc(bigtime_t timeout, int timebase, uint32 flags);

View File

@ -295,6 +295,9 @@ syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret)
case SYSCALL_RESUME_THREAD:
*call_ret = _user_resume_thread((thread_id)arg0);
break;
case SYSCALL_RENAME_THREAD:
*call_ret = _user_rename_thread((thread_id)arg0, (const char *)arg1);
break;
case SYSCALL_SEND_DATA:
*call_ret = _user_send_data((thread_id)arg0, (int32)arg1, (const void *)arg2, (size_t)arg3);
break;

View File

@ -98,6 +98,7 @@ SYSCALL5(_kern_spawn_thread, 35)
SYSCALL1(_kern_kill_thread, 36)
SYSCALL1(_kern_suspend_thread, 37)
SYSCALL1(_kern_resume_thread, 38)
SYSCALL2(_kern_rename_thread, 141)
SYSCALL4(_kern_snooze_etc, 17)
SYSCALL4(_kern_send_data, 94)
SYSCALL3(_kern_receive_data, 95)

View File

@ -1,4 +1,4 @@
/*
/*
** Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
@ -80,8 +80,7 @@ find_thread(const char *name)
status_t
rename_thread(thread_id thread, const char *name)
{
// ToDo: rename_thread not implemented
return B_ERROR;
return _kern_rename_thread(thread, name);
}