summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-05-15 11:51:22 +0200
committerStef Walter <stefw@gnome.org>2013-05-15 11:51:22 +0200
commitde8b99e2f04f94313a7748adedf7535603013951 (patch)
tree2e9ce2fc6cc7cf1dfc86fd7af731b12f252cae59 /common
parent4bd7eda265b94dfcb9a1db4aba756e1e05dd4f87 (diff)
Implement valgrind's hellgrind checks for threading problems
And cleanup our locks/locking model. There's no need to use recursive locks, especially since we can't use them on all platforms. In addition adjust taking of locks during initialization so that there's no chance of deadlocking here.
Diffstat (limited to 'common')
-rw-r--r--common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/compat.c b/common/compat.c
index 4d8d73c..b8ed2ad 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -161,7 +161,7 @@ p11_mutex_init (p11_mutex_t *mutex)
int ret;
pthread_mutexattr_init (&attr);
- pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_DEFAULT);
ret = pthread_mutex_init (mutex, &attr);
assert (ret == 0);
pthread_mutexattr_destroy (&attr);