diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/library.c | 3 | ||||
-rw-r--r-- | common/library.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/common/library.c b/common/library.c index 502ea98..39a9c46 100644 --- a/common/library.c +++ b/common/library.c @@ -59,6 +59,8 @@ static p11_local * _p11_library_get_thread_local (void); p11_mutex_t p11_library_mutex; +p11_mutex_t p11_virtual_mutex; + #ifdef OS_UNIX pthread_once_t p11_library_once = PTHREAD_ONCE_INIT; #endif @@ -118,6 +120,7 @@ p11_library_init_impl (void) p11_debug_init (); p11_debug ("initializing library"); p11_mutex_init (&p11_library_mutex); + p11_mutex_init (&p11_virtual_mutex); pthread_key_create (&thread_local, free); p11_message_storage = thread_local_message; diff --git a/common/library.h b/common/library.h index f87494d..c3840f8 100644 --- a/common/library.h +++ b/common/library.h @@ -44,6 +44,9 @@ extern p11_mutex_t p11_library_mutex; +/* Used in virtual.c to maintain the global list of precompiled closures */ +extern p11_mutex_t p11_virtual_mutex; + extern unsigned int p11_forkid; #define p11_lock() p11_mutex_lock (&p11_library_mutex); |