31 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
37 #ifdef PRINT_THREAD_STACK_TRACE
38 #define INIT_STACK METHOD_STACK* _stack
39 #define SAVE_STACK(methodName, methodPosition) \
40 _stack = new METHOD_STACK; \
41 _stack->strMethodName = (methodName); \
42 _stack->strPosition = (methodPosition); \
43 CAThread::setCurrentStack(_stack)
45 #define FINISH_STACK(methodName) SAVE_STACK(methodName, CAThread::METHOD_END)
46 #define BEGIN_STACK(methodName) SAVE_STACK(methodName, CAThread::METHOD_BEGIN)
49 #define BEGIN_STACK(methodName)
50 #define FINISH_STACK(methodName)
51 #define SAVE_STACK(methodName, methodPosition)
72 #ifdef PRINT_THREAD_STACK_TRACE
73 struct __METHOD_STACK__
75 const char* strMethodName;
76 const char* strPosition;
79 typedef struct __METHOD_STACK__ METHOD_STACK;
129 m_Thread = L4THREAD_INVALID_ID;
138 #ifdef PRINT_THREAD_STACK_TRACE
139 static void setCurrentStack(METHOD_STACK* a_stack);
140 static METHOD_STACK* getCurrentStack();
166 SINT32 start(
void* param,
bool bDaemon=
false,
bool bSilent=
false);
210 #ifdef PRINT_THREAD_STACK_TRACE
211 static const char* METHOD_BEGIN;
212 static const char* METHOD_END;
215 #ifdef PRINT_THREAD_STACK_TRACE
216 static void destroyValue(
void* a_stack);
217 static void initKey();
220 static pthread_key_t ms_threadKey;
221 static pthread_once_t ms_threadKeyInit;
232 #if defined _DEBUG && ! defined(ONLY_LOCAL_PROXY)
237 m_pThreadList=pThreadList;
THREAD_RETURN(* THREAD_MAIN_TYP)(void *)
Defines the type of the main function of the thread.
unsigned long long thread_id_t
Type of an ID for a thread which can be used to identify the current and other threads.
THREAD_MAIN_TYP m_fncMainLoop
CAThread()
Creates a CAThread object but no actual thread.
static thread_id_t getSelfID()
SINT32 start(void *param, bool bDaemon=false, bool bSilent=false)
Starts the execution of the main function of this thread.
SINT32 setMainLoop(THREAD_MAIN_TYP fnc)
Sets the main function which will be executed within this thread.
SINT32 join()
Waits for the main function to finish execution.