Permalink
Browse files

Add ASSERT_SINGLE_THREAD

  • Loading branch information...
1 parent 8c721c4 commit fffbda1b909f1825b4d7712726413934a23e0f64 @AlericInglewood committed Mar 12, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 indra/llcommon/llthread.h
@@ -41,6 +41,9 @@
#ifdef SHOW_ASSERT
extern LL_COMMON_API bool is_main_thread(void);
+#define ASSERT_SINGLE_THREAD do { static apr_os_thread_t first_thread_id = apr_os_thread_current(); llassert(apr_os_thread_equal(first_thread_id, apr_os_thread_current())); } while(0)
+#else
+#define ASSERT_SINGLE_THREAD do { } while(0)
#endif
class LLThread;

0 comments on commit fffbda1

Please sign in to comment.