diff options
author | sasha@mysql.sashanet.com <> | 2002-03-08 09:26:56 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2002-03-08 09:26:56 -0700 |
commit | 28848fa93b5762476d14465ea16502c970d846fb (patch) | |
tree | 3f622007faec3b0ff2a080a3013d798c891dedc8 /include | |
parent | 7779e2cbe6da21258b0f71c5bf1d766b686ad3cf (diff) | |
download | mariadb-git-28848fa93b5762476d14465ea16502c970d846fb.tar.gz |
DBUG_ASSERT_LOCK
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 45da9129aef..4aee27e2939 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -725,6 +725,12 @@ byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen); ulong checksum(const byte *mem, uint count); uint my_bit_log2(ulong value); +#if defined(SAFE_MUTEX) && !defined(DBUG_OFF) +#define DBUG_ASSERT_LOCK(lock) DBUG_ASSERT((lock)->count == 1 && \ + (lock)->thread == pthread_self()) +#else +#define DBUG_ASSERT_LOCK(lock) +#endif #if defined(_MSC_VER) && !defined(__WIN__) extern void sleep(int sec); |