summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.fi>2002-04-16 16:29:14 +0300
committerunknown <monty@tik.mysql.fi>2002-04-16 16:29:14 +0300
commit667da1396b5a20ad7b4ba94136e47e64b6368daa (patch)
tree1ffc14ca2c35e314c452fe5d5169332a4e892d85 /mysys/my_pthread.c
parent0eb8770799374dc2a9ab4962b77de8bbc4015f93 (diff)
downloadmariadb-git-667da1396b5a20ad7b4ba94136e47e64b6368daa.tar.gz
Fixed pthread_cond_timedwait() for HPUX and DCE threads
Cleanup of LIBWRAP handling Docs/manual.texi: Changelog include/my_pthread.h: Fixed pthread_cond_timedwait() for HPUX and DCE threads mysys/my_pthread.c: Fixed pthread_cond_timedwait() for HPUX and DCE threads sql/item_func.cc: Fixed the GET_LOCK() works with HPUX and DCE threads sql/mysqld.cc: Cleanup of LIBWRAP handling sql/sql_parse.cc: Safety fix
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 8bdbc0f7fd8..8c6b366e9b1 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -410,9 +410,23 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif
+/* Change functions on HP to work according to POSIX */
+
+#ifdef HAVE_DEC_THREADS
+#undef pthread_cond_timedwait
+
+int my_pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ struct timespec *abstime)
+{
+ int error=pthread_cond_timedwait(cond,mutex,abstime);
+ return error == EAGAIN ? ETIMEDOUT : error;
+}
+#endif /* HAVE_DEC_THREADS */
+
/*
-** Emulate SOLARIS style calls, not because it's better, but just to make the
-** usage of getbostbyname_r simpler.
+ Emulate SOLARIS style calls, not because it's better, but just to make the
+ usage of getbostbyname_r simpler.
*/
#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)