[uim-commit] r1534 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Wed Sep 21 04:27:49 PDT 2005
Author: tkng
Date: 2005-09-21 04:27:47 -0700 (Wed, 21 Sep 2005)
New Revision: 1534
Modified:
trunk/uim/uimint.h
Log:
* uim/uimint.h: Restored disappered mutex functionalities.
Modified: trunk/uim/uimint.h
===================================================================
--- trunk/uim/uimint.h 2005-09-21 11:16:49 UTC (rev 1533)
+++ trunk/uim/uimint.h 2005-09-21 11:27:47 UTC (rev 1534)
@@ -119,6 +119,20 @@
int nr_psegs;
};
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+ #define UIM_DEFINE_MUTEX(mtx) \
+ pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER
+ #define UIM_DEFINE_MUTEX_STATIC(mtx) \
+ static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER
+ #define UIM_LOCK_MUTEX(mtx) pthread_mutex_lock(&mtx)
+ #define UIM_UNLOCK_MUTEX(mtx) pthread_mutex_unlock(&mtx)
+#else
+ #define UIM_DEFINE_MUTEX(mtx)
+ #define UIM_DEFINE_MUTEX_STATIC(mtx)
+ #define UIM_LOCK_MUTEX(mtx)
+ #define UIM_UNLOCK_MUTEX(mtx)
+#endif /* HAVE_PTHREAD_H */
#ifdef ENABLE_NLS
#define UIM_PREPARE_SAVING_TEXTDOMAIN_CODESET() \
More information about the uim-commit
mailing list