From de8b99e2f04f94313a7748adedf7535603013951 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 15 May 2013 11:51:22 +0200 Subject: 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. --- common/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') 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); -- cgit v1.1