summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-10-25 20:30:51 +0300
committerDmitry Stogov <dmitry@zend.com>2018-10-25 20:30:51 +0300
commit33e777acbfb9bbd2a7efabc7365104780db4c6b0 (patch)
tree73e5afff1d5008d1050cb1ce1a9923063acae377 /Zend/zend.h
parentf33da6f3387d4d4a2b820986aec11c8e37141c6c (diff)
downloadphp-git-33e777acbfb9bbd2a7efabc7365104780db4c6b0.tar.gz
Improved shared interned strings handling. The previous implementation worked incorrectly in ZTS build. It changed strings only in function/class tables of one thread. Now all threads gets the same shared interned strings. Also, on shutdown, we don't try to replace SHM interned strings back to process strings, but delay dettachment of SHM instead.
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index 0d3ce9ffa8..c7885a68a5 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -293,7 +293,10 @@ extern void (*zend_printf_to_smart_string)(smart_string *buf, const char *format
extern void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
+
+/* These two callbacks are especially for opcache */
extern ZEND_API int (*zend_post_startup_cb)(void);
+extern ZEND_API void (*zend_post_shutdown_cb)(void);
ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);