[mutex] Remove unused HB_MUTEX_IMPL_INIT / HB_MUTEX_INIT
https://github.com/harfbuzz/harfbuzz/pull/3100#issuecomment-890089096
This commit is contained in:
parent
0e37c07f4c
commit
ee7473b8a4
|
@ -39,8 +39,7 @@
|
|||
|
||||
/* We need external help for these */
|
||||
|
||||
#if defined(HB_MUTEX_IMPL_INIT) \
|
||||
&& defined(hb_mutex_impl_init) \
|
||||
#if defined(hb_mutex_impl_init) \
|
||||
&& defined(hb_mutex_impl_lock) \
|
||||
&& defined(hb_mutex_impl_unlock) \
|
||||
&& defined(hb_mutex_impl_finish)
|
||||
|
@ -52,7 +51,6 @@
|
|||
|
||||
#include <pthread.h>
|
||||
typedef pthread_mutex_t hb_mutex_impl_t;
|
||||
#define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER
|
||||
#define hb_mutex_impl_init(M) pthread_mutex_init (M, nullptr)
|
||||
#define hb_mutex_impl_lock(M) pthread_mutex_lock (M)
|
||||
#define hb_mutex_impl_unlock(M) pthread_mutex_unlock (M)
|
||||
|
@ -62,7 +60,6 @@ typedef pthread_mutex_t hb_mutex_impl_t;
|
|||
#elif !defined(HB_NO_MT) && defined(_WIN32)
|
||||
|
||||
typedef CRITICAL_SECTION hb_mutex_impl_t;
|
||||
#define HB_MUTEX_IMPL_INIT {0}
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0)
|
||||
#else
|
||||
|
@ -76,7 +73,6 @@ typedef CRITICAL_SECTION hb_mutex_impl_t;
|
|||
#elif defined(HB_NO_MT)
|
||||
|
||||
typedef int hb_mutex_impl_t;
|
||||
#define HB_MUTEX_IMPL_INIT 0
|
||||
#define hb_mutex_impl_init(M) HB_STMT_START {} HB_STMT_END
|
||||
#define hb_mutex_impl_lock(M) HB_STMT_START {} HB_STMT_END
|
||||
#define hb_mutex_impl_unlock(M) HB_STMT_START {} HB_STMT_END
|
||||
|
@ -91,8 +87,6 @@ typedef int hb_mutex_impl_t;
|
|||
#endif
|
||||
|
||||
|
||||
#define HB_MUTEX_INIT {HB_MUTEX_IMPL_INIT}
|
||||
|
||||
struct hb_mutex_t
|
||||
{
|
||||
hb_mutex_impl_t m;
|
||||
|
|
Loading…
Reference in New Issue