gml_Thread.h File Reference


Detailed Description

Wrapper around APR's cross-platform threading API.

#include "gml/base/gml_Types.h"
#include "gml/base/gml_Errors.h"

Go to the source code of this file.


Typedefs

typedef gml_TThread_ * gml_TThreadId
 Opaque identifier fo a thread.
typedef void(*) gml_TThreadProc (gml_TThreadId, void *)
 The type of "main" thread procedures.
typedef void(*) gml_TThreadExitProc (void *)
 The type of thread termination handlers.

Functions

GML_EXTERN_C gml_TError gml_Thread_Create (gml_TThreadId *idPtr, gml_TThreadProc threadProc, void *clientData)
 Spawn a thread that runs threadProc, which is passed the clientData argument.
GML_EXTERN_C gml_TThreadId gml_Thread_GetCurrent ()
 Return the identifier of the calling thread.
GML_EXTERN_C void gml_Thread_CreateExitHandler (gml_TThreadExitProc proc, void *clientData)
 Make sure proc gets called with argument clientData when the current thread terminates.
GML_EXTERN_C void gml_Thread_DeleteExitHandler (gml_TThreadExitProc proc, void *clientData)
 Cancel a call to gml_Thread_CreateExitHandler.
GML_EXTERN_C void gml_Thread_Sleep (UInt32 milliseconds)
 Suspend execution in the calling thread for at least milliseconds.

Variables

gml_TError gml_gThreadErrorCantCreate
 Returned when thread creation fails.

Function Documentation

GML_EXTERN_C gml_TError gml_Thread_Create ( gml_TThreadId idPtr,
gml_TThreadProc  threadProc,
void *  clientData 
)

Spawn a thread that runs threadProc, which is passed the clientData argument.

Return the identifier of the spawned thread in idPtr.

Generated on Tue Jun 12 14:03:28 2007 for gml by Doxygen 1.5.2.