summaryrefslogtreecommitdiff
path: root/mysys/thr_rwlock.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-31 22:00:09 +0300
committerunknown <monty@donna.mysql.com>2000-08-31 22:00:09 +0300
commit5a95cfdd68544f1728f7c2d3e92220bcafb7ac1a (patch)
tree96f970afaa1f5743c4cb056f49e66b1d99eb2da4 /mysys/thr_rwlock.c
parentae172fdcc0b77f28e1dc8c2f631e0d16aac086e6 (diff)
downloadmariadb-git-5a95cfdd68544f1728f7c2d3e92220bcafb7ac1a.tar.gz
Portability changes
Docs/manual.texi: Comment about timestamp include/my_pthread.h: Portability fix mysys/thr_rwlock.c: Fix for hpux
Diffstat (limited to 'mysys/thr_rwlock.c')
-rw-r--r--mysys/thr_rwlock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysys/thr_rwlock.c b/mysys/thr_rwlock.c
index 37630956e7f..dfa9065ff3a 100644
--- a/mysys/thr_rwlock.c
+++ b/mysys/thr_rwlock.c
@@ -65,8 +65,13 @@ int my_rwlock_init( rw_lock_t *rwp, void *arg __attribute__((unused)))
pthread_mutex_init( &rwp->lock, NULL );
pthread_condattr_init( &cond_attr );
+#ifdef HAVE_PTHREAD_CONDATTR_CREATE /* HPUX 11.0 */
+ pthread_cond_init( &rwp->readers, cond_attr );
+ pthread_cond_init( &rwp->writers, cond_attr );
+#else
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
+#endif
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;