summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2002-09-17 12:42:11 +0000
committerZeev Suraski <zeev@php.net>2002-09-17 12:42:11 +0000
commit711be83d49dfc886cf76e6a8b69272f5fb4912ef (patch)
tree684366237c8c039a252177ec81f1972b3b3ebabd /Zend/zend.c
parent0c7d9c3742667b77a84bb6e571d00b6376c18d50 (diff)
downloadphp-git-711be83d49dfc886cf76e6a8b69272f5fb4912ef.tar.gz
MFZE1 - threading fix
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index e420d1a7df..3b85831770 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -497,6 +497,21 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
}
+#ifdef ZTS
+/* Unlink the global (r/o) copies of the class, function and constant tables,
+ * and use a fresh r/w copy for the startup thread
+ */
+void zend_post_startup(TSRMLS_D)
+{
+ zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
+
+ compiler_globals_ctor(compiler_globals, tsrm_ls);
+ zend_startup_constants(TSRMLS_C);
+ zend_copy_constants(EG(zend_constants), global_constants_table);
+}
+#endif
+
+
void zend_shutdown(TSRMLS_D)
{
#ifdef ZEND_WIN32