提交 49f8e0cd 编写于 作者: B Behdad Esfahbod

GStaticMutex is deprecated

上级 5e113a4b
......@@ -67,12 +67,21 @@ typedef pthread_mutex_t hb_mutex_impl_t;
#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
#include <glib.h>
#if !GLIB_CHECK_VERSION(2,32,0)
typedef GStaticMutex hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT G_STATIC_MUTEX_INIT
#define hb_mutex_impl_init(M) g_static_mutex_init (M)
#define hb_mutex_impl_lock(M) g_static_mutex_lock (M)
#define hb_mutex_impl_unlock(M) g_static_mutex_unlock (M)
#define hb_mutex_impl_finish(M) g_static_mutex_free (M)
#else
typedef GMutex hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT {0}
#define hb_mutex_impl_init(M) g_mutex_init (M)
#define hb_mutex_impl_lock(M) g_mutex_lock (M)
#define hb_mutex_impl_unlock(M) g_mutex_unlock (M)
#define hb_mutex_impl_finish(M) g_mutex_clear (M)
#endif
#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册