Defines | Typedefs | Enumerations | Functions

prthread.h File Reference

#include "prtypes.h"
#include "prinrval.h"
Include dependency graph for nspr/prthread.h:
This graph shows which files directly or indirectly include this file:

Defines

#define PR_CurrentThread()   PR_GetCurrentThread()

Typedefs

typedef struct PRThread PRThread
typedef struct PRThreadStack PRThreadStack
typedef enum PRThreadType PRThreadType
typedef enum PRThreadScope PRThreadScope
typedef enum PRThreadState PRThreadState
typedef enum PRThreadPriority PRThreadPriority
typedef void(* PRThreadPrivateDTOR )(void *priv)

Enumerations

enum  PRThreadType { PR_USER_THREAD, PR_SYSTEM_THREAD, PR_USER_THREAD, PR_SYSTEM_THREAD }
enum  PRThreadScope {
  PR_LOCAL_THREAD, PR_GLOBAL_THREAD, PR_GLOBAL_BOUND_THREAD, PR_LOCAL_THREAD,
  PR_GLOBAL_THREAD, PR_GLOBAL_BOUND_THREAD
}
enum  PRThreadState { PR_JOINABLE_THREAD, PR_UNJOINABLE_THREAD, PR_JOINABLE_THREAD, PR_UNJOINABLE_THREAD }
enum  PRThreadPriority {
  PR_PRIORITY_FIRST = 0, PR_PRIORITY_LOW = 0, PR_PRIORITY_NORMAL = 1, PR_PRIORITY_HIGH = 2,
  PR_PRIORITY_URGENT = 3, PR_PRIORITY_LAST = 3, PR_PRIORITY_FIRST = 0, PR_PRIORITY_LOW = 0,
  PR_PRIORITY_NORMAL = 1, PR_PRIORITY_HIGH = 2, PR_PRIORITY_URGENT = 3, PR_PRIORITY_LAST = 3
}

Functions

PRThreadPR_CreateThread (PRThreadType type, void(*start)(void *arg), void *arg, PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize)
PRStatus PR_JoinThread (PRThread *thread)
PRThreadPR_GetCurrentThread (void)
PRThreadPriority PR_GetThreadPriority (const PRThread *thread)
void PR_SetThreadPriority (PRThread *thread, PRThreadPriority priority)
PRStatus PR_NewThreadPrivateIndex (PRUintn *newIndex, PRThreadPrivateDTOR destructor)
PRStatus PR_SetThreadPrivate (PRUintn tpdIndex, void *priv)
void * PR_GetThreadPrivate (PRUintn tpdIndex)
PRStatus PR_Interrupt (PRThread *thread)
void PR_ClearInterrupt (void)
void PR_BlockInterrupt (void)
void PR_UnblockInterrupt (void)
PRStatus PR_Sleep (PRIntervalTime ticks)
PRThreadScope PR_GetThreadScope (const PRThread *thread)
PRThreadType PR_GetThreadType (const PRThread *thread)
PRThreadState PR_GetThreadState (const PRThread *thread)

Define Documentation

#define PR_CurrentThread (  )     PR_GetCurrentThread()

Typedef Documentation

typedef struct PRThread PRThread
typedef void( * PRThreadPrivateDTOR)(void *priv)
typedef struct PRThreadStack PRThreadStack
typedef enum PRThreadType PRThreadType

Enumeration Type Documentation

Enumerator:
PR_PRIORITY_FIRST 
PR_PRIORITY_LOW 
PR_PRIORITY_NORMAL 
PR_PRIORITY_HIGH 
PR_PRIORITY_URGENT 
PR_PRIORITY_LAST 
PR_PRIORITY_FIRST 
PR_PRIORITY_LOW 
PR_PRIORITY_NORMAL 
PR_PRIORITY_HIGH 
PR_PRIORITY_URGENT 
PR_PRIORITY_LAST 
Enumerator:
PR_LOCAL_THREAD 
PR_GLOBAL_THREAD 
PR_GLOBAL_BOUND_THREAD 
PR_LOCAL_THREAD 
PR_GLOBAL_THREAD 
PR_GLOBAL_BOUND_THREAD 
Enumerator:
PR_JOINABLE_THREAD 
PR_UNJOINABLE_THREAD 
PR_JOINABLE_THREAD 
PR_UNJOINABLE_THREAD 
Enumerator:
PR_USER_THREAD 
PR_SYSTEM_THREAD 
PR_USER_THREAD 
PR_SYSTEM_THREAD 

Function Documentation

void PR_BlockInterrupt ( void   ) 
void PR_ClearInterrupt ( void   ) 
PRThread* PR_CreateThread ( PRThreadType  type,
void(*)(void *arg)  start,
void *  arg,
PRThreadPriority  priority,
PRThreadScope  scope,
PRThreadState  state,
PRUint32  stackSize 
)
PRThread* PR_GetCurrentThread ( void   ) 
PRThreadPriority PR_GetThreadPriority ( const PRThread thread  ) 
void* PR_GetThreadPrivate ( PRUintn  tpdIndex  ) 
PRThreadScope PR_GetThreadScope ( const PRThread thread  ) 
PRThreadState PR_GetThreadState ( const PRThread thread  ) 
PRThreadType PR_GetThreadType ( const PRThread thread  ) 
PRStatus PR_Interrupt ( PRThread thread  ) 
PRStatus PR_JoinThread ( PRThread thread  ) 
PRStatus PR_NewThreadPrivateIndex ( PRUintn *  newIndex,
PRThreadPrivateDTOR  destructor 
)
void PR_SetThreadPriority ( PRThread thread,
PRThreadPriority  priority 
)
PRStatus PR_SetThreadPrivate ( PRUintn  tpdIndex,
void *  priv 
)
PRStatus PR_Sleep ( PRIntervalTime  ticks  ) 
void PR_UnblockInterrupt ( void   )