summaryrefslogtreecommitdiff
path: root/TSRM/TSRM.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-03-04 10:39:13 +0100
committerAnatol Belski <ab@php.net>2017-03-04 10:39:13 +0100
commitc6982995504b6e21e8a5ade29cfb16a55196dc43 (patch)
treea196886e83d43fa9ece21e127edde10e3ab57c3e /TSRM/TSRM.h
parenta07272e5b63b404ff7070637137e81634a886bd8 (diff)
downloadphp-git-c6982995504b6e21e8a5ade29cfb16a55196dc43.tar.gz
Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch implements two types of interned strings - interning per process, strings are not freed till process end - interning per request, strings are freed at request end There is no runtime interning. With Opcache, all the permanent iterned strings are copied into SHM on startup, additional copying into SHM might happen on demand.
Diffstat (limited to 'TSRM/TSRM.h')
-rw-r--r--TSRM/TSRM.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index f9bb241050..2ffcbfee76 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -128,6 +128,7 @@ TSRM_API void ts_free_id(ts_rsrc_id id);
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id);
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id);
+typedef void (*tsrm_shutdown_func_t)(void);
TSRM_API int tsrm_error(int level, const char *format, ...);
@@ -145,6 +146,7 @@ TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset);
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);
+TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler);
/* these 3 APIs should only be used by people that fully understand the threading model
* used by PHP/Zend and the selected SAPI. */