Added GetIThread method

This commit is contained in:
warren@netscape.com
1999-04-06 06:09:15 +00:00
parent 108af85a4a
commit 11b00a2151
4 changed files with 22 additions and 2 deletions
+7 -1
View File
@@ -201,6 +201,12 @@ nsThread::RegisterThreadSelf()
NS_BASE nsresult
nsIThread::GetCurrent(nsIThread* *result)
{
return GetIThread(PR_CurrentThread(), result);
}
NS_BASE nsresult
nsIThread::GetIThread(PRThread* prthread, nsIThread* *result)
{
PRStatus status;
nsThread* thread;
@@ -219,7 +225,7 @@ nsIThread::GetCurrent(nsIThread* *result)
if (thread == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(thread);
thread->SetPRThread(PR_CurrentThread());
thread->SetPRThread(prthread);
nsresult rv = thread->RegisterThreadSelf();
if (NS_FAILED(rv)) return rv;
}