summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbregex.c
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2002-10-08 17:20:10 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2002-10-08 17:20:10 +0000
commit579a1c3ab16ba7ee62ceb3c50bf7c07b349ab224 (patch)
tree7a690a26a62485035397bad94b33a79f91e0a98b /ext/mbstring/mbregex.c
parent03777770c003ac852d3168bfd1ec60648c14f2dd (diff)
downloadphp-git-579a1c3ab16ba7ee62ceb3c50bf7c07b349ab224.tar.gz
ZTS fixes
Diffstat (limited to 'ext/mbstring/mbregex.c')
-rw-r--r--ext/mbstring/mbregex.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/mbstring/mbregex.c b/ext/mbstring/mbregex.c
index 2630ed33ae..1908c687cc 100644
--- a/ext/mbstring/mbregex.c
+++ b/ext/mbstring/mbregex.c
@@ -306,9 +306,16 @@ init_syntax_once()
register int c;
static int done = 0;
+#ifdef ZTS
+ extern MUTEX_T mbregex_locale_mutex;
+#endif
+
if (done) {
return;
}
+#ifdef ZTS
+ tsrm_mutex_lock( mbregex_locale_mutex );
+#endif
memset(re_syntax_table, 0, sizeof(re_syntax_table));
@@ -324,6 +331,9 @@ init_syntax_once()
re_syntax_table[c] = Sword2;
}
}
+#ifdef ZTS
+ tsrm_mutex_unlock( mbregex_locale_mutex );
+#endif
done = 1;
}