[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/04: mhd_locks: added ability to statical
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/04: mhd_locks: added ability to statically initialise mutex, if supported by mutex library |
Date: |
Mon, 27 Nov 2017 20:09:13 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 201a12289de9f50092a7a4aa804159ccbf7166a9
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Nov 27 16:55:29 2017 +0300
mhd_locks: added ability to statically initialise mutex,
if supported by mutex library
---
src/microhttpd/mhd_locks.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/microhttpd/mhd_locks.h b/src/microhttpd/mhd_locks.h
index 4f2c17e5..21db56c4 100644
--- a/src/microhttpd/mhd_locks.h
+++ b/src/microhttpd/mhd_locks.h
@@ -86,6 +86,15 @@
#endif
#if defined(MHD_PTHREAD_MUTEX_)
+# if defined(PTHREAD_MUTEX_INITIALIZER)
+/**
+ * Define static mutex and statically initialise it.
+ */
+# define MHD_MUTEX_STATIC_DEFN_INIT_(m) static MHD_mutex_ m =
PTHREAD_MUTEX_INITIALIZER
+# endif /* PTHREAD_MUTEX_INITIALIZER */
+#endif
+
+#if defined(MHD_PTHREAD_MUTEX_)
/**
* Destroy previously initialised mutex.
* @param pmutex pointer to mutex
--
To stop receiving notification emails like this one, please contact
address@hidden