Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsIThread.idl File Reference
import "nsISupports.idl";
#include "prthread.h"

Go to the source code of this file.

Classes

interface  nsIThread

Defines

#define NS_THREAD_CID
#define NS_THREAD_CONTRACTID   "@mozilla.org/thread;1"
#define NS_THREAD_CLASSNAME   "Thread"

Functions

native PRThread (PRThread)
NS_COM nsresult NS_NewThread (nsIThread **result, nsIRunnable *runnable, PRUint32 stackSize=0, PRThreadState state=PR_UNJOINABLE_THREAD, PRThreadPriority priority=PR_PRIORITY_NORMAL, PRThreadScope scope=PR_GLOBAL_THREAD)
NS_COM nsresult NS_NewThread (nsIThread **result, PRUint32 stackSize=0, PRThreadState state=PR_UNJOINABLE_THREAD, PRThreadPriority priority=PR_PRIORITY_NORMAL, PRThreadScope scope=PR_GLOBAL_THREAD)

Define Documentation

Value:
{ /* 85CE5510-7808-11d3-A181-0050041CAF44 */         \
    0x85ce5510,                                      \
    0x7808,                                          \
    0x11d3,                                          \
    {0xa1, 0x81, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44} \
}

Definition at line 43 of file nsIThread.idl.

#define NS_THREAD_CLASSNAME   "Thread"

Definition at line 52 of file nsIThread.idl.

#define NS_THREAD_CONTRACTID   "@mozilla.org/thread;1"

Definition at line 51 of file nsIThread.idl.


Function Documentation

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:

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:

native PRThread ( PRThread  )