[master] 18eee95 Try disabling PTHREAD_MUTEX_ERRORCHECK on __APPLE__ platforms.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Apr 28 10:49:51 CEST 2015
commit 18eee95dbc605f9b110eb2b11be434979d3308af
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Apr 28 08:49:33 2015 +0000
Try disabling PTHREAD_MUTEX_ERRORCHECK on __APPLE__ platforms.
diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c
index 5c094f1..1231e1b 100644
--- a/bin/varnishd/cache/cache_lck.c
+++ b/bin/varnishd/cache/cache_lck.c
@@ -55,8 +55,7 @@ struct ilck {
static pthread_mutexattr_t attr;
-static VTAILQ_HEAD(, ilck) ilck_head =
- VTAILQ_HEAD_INITIALIZER(ilck_head);
+static VTAILQ_HEAD(, ilck) ilck_head = VTAILQ_HEAD_INITIALIZER(ilck_head);
static pthread_mutex_t lck_mtx;
@@ -210,7 +209,9 @@ LCK_Init(void)
{
AZ(pthread_mutexattr_init(&attr));
+#if !defined(__APPLE__)
AZ(pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK));
+#endif
AZ(pthread_mutex_init(&lck_mtx, &attr));
#define LOCK(nam) \
lck_##nam = VSM_Alloc(sizeof(struct VSC_C_lck), \
More information about the varnish-commit
mailing list