Go to the documentation of this file.
25 #ifndef __I6ENGINE_UTILS_I6ETHREADSAFETY_H__
26 #define __I6ENGINE_UTILS_I6ETHREADSAFETY_H__
30 #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
33 #include <sys/syscall.h>
36 #if ISIXE_MODE == I6E_RELEASE
37 #define ASSERT_THREAD_SAFETY_HEADER
38 #define ASSERT_THREAD_SAFETY_CONSTRUCTOR
39 #define ASSERT_THREAD_SAFETY_FUNCTION
41 #define ASSERT_THREAD_SAFETY_HEADER int _threadID;
42 #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
43 #define ASSERT_THREAD_SAFETY_CONSTRUCTOR _threadID = GetCurrentThreadId();
44 #define ASSERT_THREAD_SAFETY_FUNCTION assert(_threadID == GetCurrentThreadId());
46 #define ASSERT_THREAD_SAFETY_CONSTRUCTOR _threadID = syscall(SYS_gettid);
47 #define ASSERT_THREAD_SAFETY_FUNCTION assert(_threadID == syscall(SYS_gettid));