Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsThread.cpp File Reference
#include "nsThread.h"
#include "prmem.h"
#include "prlog.h"
#include "nsAutoLock.h"

Go to the source code of this file.

Functions

NS_COM nsresult NS_NewThread (nsIThread **result, nsIRunnable *runnable, PRUint32 stackSize, PRThreadState state, PRThreadPriority priority, PRThreadScope scope)
NS_COM nsresult NS_NewThread (nsIThread **result, PRUint32 stackSize, PRThreadState state, PRThreadPriority priority, PRThreadScope scope)

Variables

static nsIThreadgMainThread = 0

Function Documentation

NS_COM nsresult NS_NewThread ( nsIThread **  result,
nsIRunnable runnable,
PRUint32  stackSize,
PRThreadState  state,
PRThreadPriority  priority,
PRThreadScope  scope 
)

Definition at line 336 of file nsThread.cpp.

{
    nsresult rv;
    nsThread* thread = new nsThread();
    if (thread == nsnull)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(thread);

    rv = thread->Init(runnable, stackSize, priority, scope, state);
    if (NS_FAILED(rv)) {
        NS_RELEASE(thread);
        return rv;
    }

    *result = thread;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_COM nsresult NS_NewThread ( nsIThread **  result,
PRUint32  stackSize,
PRThreadState  state,
PRThreadPriority  priority,
PRThreadScope  scope 
)

Definition at line 360 of file nsThread.cpp.

{
    nsThread* thread = new nsThread();
    if (thread == nsnull)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(thread);
    *result = thread;
    return NS_OK;
}

Here is the call graph for this function:


Variable Documentation

nsIThread* gMainThread = 0 [static]

Definition at line 44 of file nsThread.cpp.