diff --git a/src/kernel/core/thread.c b/src/kernel/core/thread.c index f1cd7d69b4..5f63e89c23 100644 --- a/src/kernel/core/thread.c +++ b/src/kernel/core/thread.c @@ -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) {