[uim-commit] r1557 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Fri Sep 23 15:05:20 PDT 2005
Author: tkng
Date: 2005-09-23 15:05:17 -0700 (Fri, 23 Sep 2005)
New Revision: 1557
Modified:
trunk/uim/uimint.h
Log:
* uim/uimint.h: Added new macros.
- (UIM_EVAL_FSTRING1_WITH_MUTEX): eval formatted string with mutex lock.
- (UIM_EVAL_FSTRING2_WITH_MUTEX): eval formatted string with mutex lock.
- (UIM_EVAL_FSTRING3_WITH_MUTEX): eval formatted string with mutex lock.
Modified: trunk/uim/uimint.h
===================================================================
--- trunk/uim/uimint.h 2005-09-23 13:38:03 UTC (rev 1556)
+++ trunk/uim/uimint.h 2005-09-23 22:05:17 UTC (rev 1557)
@@ -169,6 +169,38 @@
UIM_RESTORE_TEXTDOMAIN_CODESET(); \
}
+#ifdef HAVE_PTHREAD_H
+
+ extern pthread_mutex_t mtx_uim_evaling;
+
+ #define UIM_EVAL_FSTRING1_WITH_MUTEX(uc, sexp_tmpl, arg1) \
+ UIM_LOCK_MUTEX(mtx_uim_evaling); \
+ UIM_EVAL_FSTRING1(uc, sexp_tmpl, arg1); \
+ UIM_UNLOCK_MUTEX(mtx_uim_evaling);
+
+ #define UIM_EVAL_FSTRING2_WITH_MUTEX(uc, sexp_tmpl, arg1, arg2) \
+ UIM_LOCK_MUTEX(mtx_uim_evaling); \
+ UIM_EVAL_FSTRING2(uc, sexp_tmpl, arg1, arg2); \
+ UIM_UNLOCK_MUTEX(mtx_uim_evaling);
+
+ #define UIM_EVAL_FSTRING3_WITH_MUTEX(uc, sexp_tmpl, arg1, arg2, arg3) \
+ UIM_LOCK_MUTEX(mtx_uim_evaling); \
+ UIM_EVAL_FSTRING3(uc, sexp_tmpl, arg1, arg2, arg3); \
+ UIM_UNLOCK_MUTEX(mtx_uim_evaling);
+
+#else
+
+ #define UIM_EVAL_FSTRING1_WITH_MUTEX(uc, sexp_tmpl, arg1) \
+ UIM_EVAL_FSTRING1(uc, sexp_tmpl, arg1);
+
+ #define UIM_EVAL_FSTRING2_WITH_MUTEX(uc, sexp_tmpl, arg1, arg2) \
+ UIM_EVAL_FSTRING2(uc, sexp_tmpl, arg1, arg2);
+
+ #define UIM_EVAL_FSTRING3_WITH_MUTEX(uc, sexp_tmpl, arg1, arg2, arg3) \
+ UIM_EVAL_FSTRING3(uc, sexp_tmpl, arg1, arg2, arg3);
+
+#endif /* HAVE_PTHREAD_H */
+
#define UIM_EVAL_FSTRING1(uc, sexp_tmpl, arg1) \
{ \
int form_size; \
More information about the uim-commit
mailing list