summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2014-09-11 23:01:16 +0200
committerIvan Maidanski <ivmai@mail.ru>2014-09-23 23:40:49 +0400
commitcf209248817c9e00f0d31d9960d2439d132a9b47 (patch)
tree4dcdd2143153ef969b2890b1a9e318652dbe343c
parentd0615e61c920120f4689ae591f731151d5ca8523 (diff)
downloadbdwgc-cf209248817c9e00f0d31d9960d2439d132a9b47.tar.gz
Relax mark_mutex attribute needed to disable elision (Linux/x64)
* pthread_support.c (setup_mark_lock): Pass PTHREAD_MUTEX_NORMAL (instead of PTHREAD_MUTEX_ERRORCHECK) to pthread_mutexattr_settype (actually, any valid settype call disables lock elision in glibc 2.19).
-rw-r--r--pthread_support.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 9c0d4bc5..33c8a338 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -2028,7 +2028,7 @@ static void setup_mark_lock(void)
if (0 != pthread_mutexattr_init(&mattr)) {
ABORT("pthread_mutexattr_init failed");
}
- if (0 != pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ERRORCHECK)) {
+ if (0 != pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_NORMAL)) {
ABORT("pthread_mutexattr_settype failed");
}
if (0 != pthread_mutex_init(&mark_mutex, &mattr)) {