cvs: ZendEngine2 / zend.c zend.h
| From: | Zeev Suraski | Date: | Tue, 17 Sep 2002 12:42:11 +0000 |
| Subject: | cvs: ZendEngine2 / zend.c zend.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-432@lists.php.net to get a copy of this message | ||
zeev Tue Sep 17 08:42:11 2002 EDT
Modified files:
/ZendEngine2 zend.c zend.h
Log:
MFZE1 - threading fix
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.178 ZendEngine2/zend.c:1.179
--- ZendEngine2/zend.c:1.178 Sun Sep 15 19:34:03 2002
+++ ZendEngine2/zend.c Tue Sep 17 08:42:11 2002
@@ -497,6 +497,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: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.182 ZendEngine2/zend.h:1.183
--- ZendEngine2/zend.h:1.182 Sun Sep 8 11:33:54 2002
+++ ZendEngine2/zend.h Tue Sep 17 08:42:11 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.182 2002/09/08 15:33:54 andi Exp $ */
+/* $Id: zend.h,v 1.183 2002/09/17 12:42:11 zeev Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -393,6 +393,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);