diff options
author | guilhem@mysql.com <> | 2005-11-19 10:43:28 +0100 |
---|---|---|
committer | guilhem@mysql.com <> | 2005-11-19 10:43:28 +0100 |
commit | 24006266d08770ab72b5a7cde4813b9065be6ba8 (patch) | |
tree | 50c76691f3d387a96de6c97132369326378c35ab /include | |
parent | 7d7eb22ed1e471706cb9f27f9d55f469fc92fb4c (diff) | |
parent | 86f1896fb0095e58e07afb3ee62a2e9394ab3579 (diff) | |
download | mariadb-git-24006266d08770ab72b5a7cde4813b9065be6ba8.tar.gz |
Merge mysql.com:/home/mysql_src/mysql-5.0-van
into mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0
(2nd try; Pekka kindly accepted to fix storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
and storage/ndb/src/kernel/vm/SimulatedBlock.cpp after I push).
Diffstat (limited to 'include')
-rw-r--r-- | include/my_pthread.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index ee2c801ff6e..6f60a6df2c1 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -536,9 +536,15 @@ void safe_mutex_end(FILE *file); #define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__) #define pthread_mutex_trylock(A) pthread_mutex_lock(A) #define pthread_mutex_t safe_mutex_t -#define safe_mutex_assert_owner(mp) DBUG_ASSERT((mp)->count > 0 && pthread_equal(pthread_self(),(mp)->thread)) +#define safe_mutex_assert_owner(mp) \ + DBUG_ASSERT((mp)->count > 0 && \ + pthread_equal(pthread_self(), (mp)->thread)) +#define safe_mutex_assert_not_owner(mp) \ + DBUG_ASSERT(! (mp)->count || \ + ! pthread_equal(pthread_self(), (mp)->thread)) #else #define safe_mutex_assert_owner(mp) +#define safe_mutex_assert_not_owner(mp) #endif /* SAFE_MUTEX */ /* READ-WRITE thread locking */ |