summaryrefslogtreecommitdiff
path: root/lib/locks.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-12-04 09:49:26 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-12-04 09:49:26 +0100
commit4d5db2069f8cead0abec31a5e36e709dd8b60abf (patch)
tree6e84ba37fa42a435bf197254b01bf267e64a364f /lib/locks.h
parent61e891599178fa95161b99a09982bfe9846504ed (diff)
downloadgnutls-4d5db2069f8cead0abec31a5e36e709dd8b60abf.tar.gz
do not deinitialize a static mutex to avoid any side-effects.
Diffstat (limited to 'lib/locks.h')
-rw-r--r--lib/locks.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/locks.h b/lib/locks.h
index cf989c6f78..d046341ea4 100644
--- a/lib/locks.h
+++ b/lib/locks.h
@@ -55,10 +55,6 @@ extern mutex_unlock_func gnutls_mutex_unlock;
# define GNUTLS_STATIC_MUTEX_UNLOCK(mutex) \
LeaveCriticalSection(mutex)
-# define GNUTLS_STATIC_MUTEX_DEINIT(mutex) \
- DeleteCriticalSection(mutex); \
- free(mutex); mutex = NULL
-
#elif defined(HAVE_PTHREAD_LOCKS)
# include <pthread.h>
# define GNUTLS_STATIC_MUTEX(mutex) \
@@ -70,17 +66,10 @@ extern mutex_unlock_func gnutls_mutex_unlock;
# define GNUTLS_STATIC_MUTEX_UNLOCK(mutex) \
pthread_mutex_unlock(&mutex)
-# define GNUTLS_STATIC_MUTEX_DEINIT(mutex) { \
- static const pthread_mutex_t t = PTHREAD_MUTEX_INITIALIZER; \
- pthread_mutex_destroy(&mutex); \
- memcpy(&mutex, &t, sizeof(mutex)); \
- }
-
#else
# define GNUTLS_STATIC_MUTEX(mutex)
# define GNUTLS_STATIC_MUTEX_LOCK(mutex)
# define GNUTLS_STATIC_MUTEX_UNLOCK(mutex)
-# define GNUTLS_STATIC_MUTEX_DEINIT(mutex)
#endif
#endif