Added find_thread() (does not yet work with name != NULL).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6860 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1370,6 +1370,18 @@ err:
|
||||
}
|
||||
|
||||
|
||||
thread_id
|
||||
find_thread(const char *name)
|
||||
{
|
||||
if (name == NULL)
|
||||
return thread_get_current_thread_id();
|
||||
|
||||
// ToDo: implement me!
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
set_thread_priority(thread_id id, int32 priority)
|
||||
{
|
||||
@@ -1651,6 +1663,19 @@ user_get_next_thread_info(team_id team, int32 *userCookie, thread_info *userInfo
|
||||
}
|
||||
|
||||
|
||||
thread_id
|
||||
_user_find_thread(const char *userName)
|
||||
{
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
|
||||
if (!IS_USER_ADDRESS(userName)
|
||||
|| user_strlcpy(name, userName, sizeof(name)) < B_OK)
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
return find_thread(name);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
user_wait_for_thread(thread_id id, status_t *userReturnCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user