mhd_locks.h: minor refactoring

This commit is contained in:
Evgeny Grin (Karlson2k)
2024-10-22 10:57:51 +02:00
parent 7cc50f8b2f
commit aecb8d7913
+10 -3
View File
@@ -135,12 +135,19 @@ typedef CRITICAL_SECTION mhd_mutex;
#if defined(mhd_MUTEX_KIND_PTHREAD)
# if defined(PTHREAD_MUTEX_INITIALIZER)
/**
* The value to statically initialise mutex
*/
# define mhd_MUTEX_INITIALISER_STAT PTHREAD_MUTEX_INITIALIZER
# endif /* PTHREAD_MUTEX_INITIALIZER */
#endif
#ifdef mhd_MUTEX_INITIALISER_STAT
/**
* 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 */
# define mhd_MUTEX_STATIC_DEFN_INIT_(m) \
static mhd_mutex m = mhd_MUTEX_INITIALISER_STAT
#endif
#if defined(mhd_MUTEX_KIND_PTHREAD)