diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-24 12:13:35 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-24 12:19:31 -0800 |
commit | a515db4aea51a032b06eb463fcc5a5b70066a18c (patch) | |
tree | 68774c3b9afbdadfbdde6ecdf8934b3099cdb331 /common.h | |
parent | 90e979d0d9a94601fc9a0c1e5ad785ede1e92381 (diff) |
Some work to allow completions to be evaluated off of the main thread
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -258,6 +258,9 @@ void assert_is_background_thread(const char *who); #define ASSERT_IS_BACKGROUND_THREAD_TRAMPOLINE(x) assert_is_background_thread(x) #define ASSERT_IS_BACKGROUND_THREAD() ASSERT_IS_BACKGROUND_THREAD_TRAMPOLINE(__FUNCTION__) +/* Useful macro for asserting that a lock is locked. This doesn't check whether this thread locked it, which it would be nice if it did, but here it is anyways. */ +void assert_is_locked(void *mutex, const char *who); +#define ASSERT_IS_LOCKED(x) assert_is_locked((void *)(&x), #x) /** Converts the wide character string \c in into it's narrow |