cvs: Zend / zend.c zend.h
| From: | Zeev Suraski | Date: | Tue, 17 Sep 2002 09:06:07 +0000 |
| Subject: | cvs: Zend / zend.c zend.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-430@lists.php.net to get a copy of this message | ||
zeev Tue Sep 17 05:06:07 2002 EDT
Modified files:
/Zend zend.c zend.h
Log:
Commit infrastructure for fixing the bug Michael Sisolak found - this
should greatly improve the stability of the thread-safe version!
Index: Zend/zend.c
diff -u Zend/zend.c:1.154 Zend/zend.c:1.155
--- Zend/zend.c:1.154 Sun Sep 15 18:49:10 2002
+++ Zend/zend.c Tue Sep 17 05:06:07 2002
@@ -481,6 +481,21 @@
}
+#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
Index: Zend/zend.h
diff -u Zend/zend.h:1.159 Zend/zend.h:1.160
--- Zend/zend.h:1.159 Tue Sep 3 06:24:34 2002
+++ Zend/zend.h Tue Sep 17 05:06:07 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.159 2002/09/03 10:24:34 zeev Exp $ */
+/* $Id: zend.h,v 1.160 2002/09/17 09:06:07 zeev Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -345,6 +345,10 @@
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int
start_builtin_functions);
void zend_shutdown(TSRMLS_D);
+
+#ifdef ZTS
+void zend_post_startup(TSRMLS_D);
+#endif
void zend_set_utility_values(zend_utility_values *utility_values);