diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-29 21:16:11 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-29 21:16:11 +0300 |
commit | 663bc26d7f7bcac569994e823e782f756ff0d319 (patch) | |
tree | 75d42fdad23d3b2f97691405afae0cf76e97f6a0 /include | |
parent | 7c261bf09128d59195ec67ac4cdf5274ac42e0cd (diff) | |
parent | 10d282f6321cf02b060ed489550b65c35f4bee58 (diff) | |
download | mariadb-git-663bc26d7f7bcac569994e823e782f756ff0d319.tar.gz |
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
Diffstat (limited to 'include')
-rw-r--r-- | include/my_pthread.h | 6 | ||||
-rw-r--r-- | include/my_sys.h | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index fda31b9d4f2..7e975a8185d 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -485,6 +485,8 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, #define my_rwlock_init(A,B) pthread_mutex_init((A),(B)) #define rw_rdlock(A) pthread_mutex_lock((A)) #define rw_wrlock(A) pthread_mutex_lock((A)) +#define rw_tryrdlock(A) pthread_mutex_trylock((A)) +#define rw_trywrlock(A) pthread_mutex_trylock((A)) #define rw_unlock(A) pthread_mutex_unlock((A)) #define rwlock_destroy(A) pthread_mutex_destroy((A)) #elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK) @@ -492,6 +494,8 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, #define my_rwlock_init(A,B) pthread_rwlock_init((A),(B)) #define rw_rdlock(A) pthread_rwlock_rdlock(A) #define rw_wrlock(A) pthread_rwlock_wrlock(A) +#define rw_tryrdlock(A) pthread_mutex_tryrdlock((A)) +#define rw_trywrlock(A) pthread_mutex_trywrlock((A)) #define rw_unlock(A) pthread_rwlock_unlock(A) #define rwlock_destroy(A) pthread_rwlock_destroy(A) #elif defined(HAVE_RWLOCK_INIT) @@ -512,6 +516,8 @@ typedef struct _my_rw_lock_t { #define rw_lock_t my_rw_lock_t #define rw_rdlock(A) my_rw_rdlock((A)) #define rw_wrlock(A) my_rw_wrlock((A)) +#define rw_tryrdlock(A) my_rw_tryrdlock((A)) +#define rw_trywrlock(A) my_rw_trywrlock((A)) #define rw_unlock(A) my_rw_unlock((A)) #define rwlock_destroy(A) my_rwlock_destroy((A)) diff --git a/include/my_sys.h b/include/my_sys.h index 9e64d3159c5..70de1e43a18 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -750,13 +750,6 @@ 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); #endif |