New AddThread() method.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31082 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-06-17 13:35:27 +00:00
parent 94af2f4293
commit d68351089d
2 changed files with 11 additions and 0 deletions

View File

@ -73,6 +73,15 @@ Team::AddThread(const thread_info& threadInfo, Thread** _thread)
}
status_t
Team::AddThread(thread_id threadID, Thread** _thread)
{
thread_info threadInfo;
status_t error = get_thread_info(threadID, &threadInfo);
return error == B_OK ? AddThread(threadInfo, _thread) : error;
}
void
Team::RemoveThread(Thread* thread)
{

View File

@ -29,6 +29,8 @@ public:
void AddThread(Thread* thread);
status_t AddThread(const thread_info& threadInfo,
Thread** _thread = NULL);
status_t AddThread(thread_id threadID,
Thread** _thread = NULL);
void RemoveThread(Thread* thread);
bool RemoveThread(thread_id threadID);
Thread* ThreadByID(thread_id threadID) const;