summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-10-17 14:16:40 +0200
committerAnatol Belski <ab@php.net>2014-10-17 14:16:40 +0200
commitfea10f6a5e5ff4d22adea5fd04476a88d4f76db8 (patch)
treeaeb75efdddd8ae643662c88bef39faafacc8130a /ext/session
parent83b8e281dba11f4a037dd5977812f84661fe895e (diff)
downloadphp-git-fea10f6a5e5ff4d22adea5fd04476a88d4f76db8.tar.gz
ext/iconv, ext/json and ext/session use static tsrmls pointer
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/config.m42
-rw-r--r--ext/session/config.w322
-rw-r--r--ext/session/php_session.h5
-rw-r--r--ext/session/session.c7
4 files changed, 13 insertions, 3 deletions
diff --git a/ext/session/config.m4 b/ext/session/config.m4
index 1c3ba78368..f3b7340a1d 100644
--- a/ext/session/config.m4
+++ b/ext/session/config.m4
@@ -11,7 +11,7 @@ PHP_ARG_WITH(mm,for mm support,
if test "$PHP_SESSION" != "no"; then
PHP_PWRITE_TEST
PHP_PREAD_TEST
- PHP_NEW_EXTENSION(session, mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c, $ext_shared)
+ PHP_NEW_EXTENSION(session, mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c, $ext_shared, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_ADD_EXTENSION_DEP(session, hash, true)
PHP_ADD_EXTENSION_DEP(session, spl)
PHP_SUBST(SESSION_SHARED_LIBADD)
diff --git a/ext/session/config.w32 b/ext/session/config.w32
index c8b217aad9..942f595da1 100644
--- a/ext/session/config.w32
+++ b/ext/session/config.w32
@@ -4,7 +4,7 @@
ARG_ENABLE("session", "session support", "yes");
if (PHP_SESSION == "yes") {
- EXTENSION("session", "mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c", false /* never shared */);
+ EXTENSION("session", "mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_PHP_SESSION", 1, "Session support");
PHP_INSTALL_HEADERS("ext/session/", "mod_mm.h php_session.h mod_files.h mod_user.h");
}
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index 9fb6477056..1bd6d561b7 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -189,7 +189,10 @@ extern zend_module_entry session_module_entry;
#define phpext_session_ptr &session_module_entry
#ifdef ZTS
-#define PS(v) TSRMG(ps_globals_id, php_ps_globals *, v)
+#define PS(v) ZEND_TSRMG(ps_globals_id, php_ps_globals *, v)
+#ifdef COMPILE_DL_SESSION
+ZEND_TSRMLS_CACHE_EXTERN;
+#endif
#else
#define PS(v) (ps_globals.v)
#endif
diff --git a/ext/session/session.c b/ext/session/session.c
index dae965b048..d8f92d2d57 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -2399,6 +2399,10 @@ static PHP_GINIT_FUNCTION(ps) /* {{{ */
{
int i;
+#if defined(COMPILE_DL_SESSION) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE;
+#endif
+
ps_globals->save_path = NULL;
ps_globals->session_name = NULL;
ps_globals->id = NULL;
@@ -2825,6 +2829,9 @@ zend_module_entry session_module_entry = {
};
#ifdef COMPILE_DL_SESSION
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE;
+#endif
ZEND_GET_MODULE(session)
#endif