Added functions allocate_thread_id() and peek_next_thread_id() and a

threadID parameter to spawn_kernel_thread_etc(). It's now possible to
set the ID of a new thread. Used in team.c to make team ID and the ID of
the main thread equal.

Fascinatingly the two added functions prompt my compiler to issue
`missing prototype' warnings, although those are obviously there. It would
be nice if someone could solve that riddle.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11621 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-03-08 18:16:16 +00:00
parent 7730601a59
commit 5939c4d7a9
2 changed files with 53 additions and 14 deletions
+5 -1
View File
@@ -55,7 +55,11 @@ thread_get_current_thread_id(void)
return t ? t->id : 0;
}
thread_id spawn_kernel_thread_etc(thread_func, const char *name, int32 priority, void *args, team_id team);
thread_id allocate_thread_id();
thread_id peek_next_thread_id();
thread_id spawn_kernel_thread_etc(thread_func, const char *name, int32 priority,
void *args, team_id team, thread_id threadID);
// used in syscalls.c
status_t _user_set_thread_priority(thread_id thread, int32 newPriority);