diff options
author | Stef Walter <stefw@gnome.org> | 2013-05-15 11:51:22 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-05-15 11:51:22 +0200 |
commit | de8b99e2f04f94313a7748adedf7535603013951 (patch) | |
tree | 2e9ce2fc6cc7cf1dfc86fd7af731b12f252cae59 /p11-kit/modules.c | |
parent | 4bd7eda265b94dfcb9a1db4aba756e1e05dd4f87 (diff) | |
download | p11-kit-de8b99e2f04f94313a7748adedf7535603013951.tar.gz |
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 'p11-kit/modules.c')
-rw-r--r-- | p11-kit/modules.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c index 19ba895..e62a43c 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -531,8 +531,8 @@ initialize_module_unlocked_reentrant (Module *mod) mod->initialize_thread = self; /* Change over to the module specific mutex */ - p11_mutex_lock (&mod->initialize_mutex); p11_unlock (); + p11_mutex_lock (&mod->initialize_mutex); if (!mod->initialize_called) { assert (mod->funcs); |