mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Update SAPI modules to interface with the new TSRM.
Enable thread-safety memory debugging in ISAPI when in debug mode
This commit is contained in:
parent
9a0b61a619
commit
030b707296
12 changed files with 13 additions and 12 deletions
|
@ -652,6 +652,7 @@ static void basic_globals_ctor(BLS_D)
|
|||
|
||||
#ifdef TRANS_SID
|
||||
memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state)));
|
||||
memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
|
|
|
@ -605,7 +605,7 @@ int Ns_ModuleInit(char *server, char *module)
|
|||
{
|
||||
php_ns_context *ctx;
|
||||
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
sapi_startup(&sapi_module);
|
||||
sapi_module.startup(&sapi_module);
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf,
|
|||
if (!apache_php_initialized) {
|
||||
apache_php_initialized = 1;
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
#endif
|
||||
sapi_startup(&sapi_module_conf);
|
||||
php_apache_startup(&sapi_module_conf);
|
||||
|
@ -708,7 +708,7 @@ void php_init_handler(server_rec *s, pool *p)
|
|||
if (!apache_php_initialized) {
|
||||
apache_php_initialized = 1;
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
#endif
|
||||
sapi_startup(&sapi_module_conf);
|
||||
php_apache_startup(&sapi_module_conf);
|
||||
|
|
|
@ -429,7 +429,7 @@ php_apache_server_shutdown(void *tmp)
|
|||
static void
|
||||
php_apache_server_startup(apr_pool_t *pchild, server_rec *s)
|
||||
{
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
sapi_startup(&sapi_module);
|
||||
sapi_module.startup(&sapi_module);
|
||||
apr_register_cleanup(pchild, NULL, php_apache_server_shutdown, NULL);
|
||||
|
|
|
@ -780,7 +780,7 @@ void pike_module_init( void )
|
|||
{
|
||||
if (!caudium_php_initialized) {
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
caudium_globals_id = ts_allocate_id(sizeof(php_caudium_request), NULL, NULL);
|
||||
#endif
|
||||
sapi_startup(&sapi_module);
|
||||
|
|
|
@ -409,7 +409,7 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1,1,0);
|
||||
tsrm_startup(1,1,0, NULL);
|
||||
#endif
|
||||
|
||||
sapi_startup(&sapi_module);
|
||||
|
|
|
@ -630,7 +630,7 @@ __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, L
|
|||
{
|
||||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, TSRM_ERROR_LEVEL_CORE, "C:\\TSRM.log");
|
||||
sapi_startup(&sapi_module);
|
||||
if (sapi_module.startup) {
|
||||
sapi_module.startup(&sapi_module);
|
||||
|
|
|
@ -542,7 +542,7 @@ php4_init(pblock *pb, Session *sn, Request *rq)
|
|||
{
|
||||
php_core_globals *core_globals;
|
||||
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
core_globals = ts_resource(core_globals_id);
|
||||
|
||||
sapi_startup(&sapi_module);
|
||||
|
|
|
@ -283,7 +283,7 @@ int php_doit(PHLS_D SLS_DC)
|
|||
|
||||
int pm_init(const char **argv)
|
||||
{
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
sapi_startup(&sapi_module);
|
||||
sapi_module.startup(&sapi_module);
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ DWORD fnWrapperProc(LPCONTROL_BLOCK lpCB)
|
|||
}
|
||||
|
||||
BOOL PHP4_startup() {
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
sapi_startup(&sapi_module);
|
||||
if (sapi_module.startup) {
|
||||
sapi_module.startup(&sapi_module);
|
||||
|
|
|
@ -703,7 +703,7 @@ void pike_module_init( void )
|
|||
{
|
||||
if (!roxen_php_initialized) {
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1, 1, 0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
#ifdef ROXEN_USE_ZTS
|
||||
roxen_globals_id = ts_allocate_id(sizeof(php_roxen_request), NULL, NULL);
|
||||
#endif
|
||||
|
|
|
@ -255,7 +255,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_startup
|
|||
{
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_startup(1,1,0);
|
||||
tsrm_startup(1, 1, 0, NULL);
|
||||
#else
|
||||
if (setjmp(EG(bailout))!=0) {
|
||||
ThrowServletException(jenv,"bailout");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue