00001
00002 #ifndef __THREAD_EVENTS_H__
00003 #define __THREAD_EVENTS_H__
00004
00005 #include "traceCoreCommon.h"
00006
00007
00008 #define _THREAD_LANG_ID 3 // language ID for threads
00009
00010
00011 #define _E_THREAD_CREATION 0
00012 #define _E_THREAD_AWAKEN 1
00013 #define _E_THREAD_RESUME 2
00014 #define _E_THREAD_SUSPEND 3
00015
00016
00017
00018 #define REGISTER_THREAD \
00019 { RegisterLanguage(_THREAD_LANG_ID, "thread"); \
00020 RegisterEvent(_THREAD_LANG_ID, _E_THREAD_CREATION); \
00021 RegisterEvent(_THREAD_LANG_ID, _E_THREAD_AWAKEN ); \
00022 RegisterEvent(_THREAD_LANG_ID, _E_THREAD_RESUME ); \
00023 RegisterEvent(_THREAD_LANG_ID, _E_THREAD_SUSPEND ); \
00024 }
00025 #define _LOG_E_THREAD_CREATION() \
00026 { LogEvent(_THREAD_LANG_ID, _E_THREAD_CREATION); }
00027 #define _LOG_E_THREAD_AWAKEN() \
00028 { LogEvent(_THREAD_LANG_ID, _E_THREAD_AWAKEN); }
00029 #define _LOG_E_THREAD_RESUME() \
00030 { LogEvent(_THREAD_LANG_ID, _E_THREAD_RESUME); }
00031 #define _LOG_E_THREAD_SUSPEND() \
00032 { LogEvent(_THREAD_LANG_ID, _E_THREAD_SUSPEND); }
00033
00034 #endif