summaryrefslogtreecommitdiffstats
path: root/lib/qpthreads.h
diff options
context:
space:
mode:
authorChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-07 11:46:57 +0000
committerChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-07 11:46:57 +0000
commite41a8e264e177d9314847ac6dea653be061a376b (patch)
treeb16e06349748a2a028a46355c2103b685508b75a /lib/qpthreads.h
parent082631fa4c75eaff3befb46a17914c0bd8e6b606 (diff)
downloadquagga-e41a8e264e177d9314847ac6dea653be061a376b.tar.bz2
quagga-e41a8e264e177d9314847ac6dea653be061a376b.tar.xz
Enabled qpt_mutex_recursive in lib/qpthreads.
This allows mutexes to be initialised as recursive. Required correctly placed setting of _GNU_SOURCE (for gcc). It is assumed that "config.h" will enable the required pthreads features -- which are now documented in lib/qpthread.c.
Diffstat (limited to 'lib/qpthreads.h')
-rw-r--r--lib/qpthreads.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/qpthreads.h b/lib/qpthreads.h
index 8da7f3a6..65e64dbf 100644
--- a/lib/qpthreads.h
+++ b/lib/qpthreads.h
@@ -31,7 +31,6 @@
#include "zassert.h"
#include "qtime.h"
-
#ifndef Inline
#define Inline static inline
#endif
@@ -58,22 +57,6 @@
#endif
/*==============================================================================
- * TEMPORARY WORKAROUND
- *
- * TODO: discover why PTHREAD_MUTEX_NORMAL etc are not defined !!
- *
- */
-
-#define PTHREAD_MUTEXATTR_SETTYPE_MISSING 1
-
-#ifdef PTHREAD_MUTEXATTR_SETTYPE_MISSING
-#define PTHREAD_MUTEX_NORMAL PTHREAD_MUTEX_TIMED_NP
-#define PTHREAD_MUTEX_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK_NP
-#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
-#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
-#endif
-
-/*==============================================================================
* Data types
*/
@@ -143,6 +126,8 @@ Inline qpt_thread_t qpt_thread_self(void)
*
* If _DEFAULT is faster than _NORMAL, then QPT_MUTEX_TYPE_DEFAULT may be
* used to override this choice.
+ *
+ * NB: do not (currently) support pthread_mutex_timedlock().
*/
enum qpt_mutex_options