summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-12-01 17:07:25 +0000
committerSascha Schumann <sas@php.net>1999-12-01 17:07:25 +0000
commit94c36e88469c10c696d80afedab63c18d83e56b8 (patch)
tree64d1213a757b5a18657952581dd8a5004828de8d /main
parent14382523bf981b79f1aacf4990f012c7b781cb5f (diff)
downloadphp-git-94c36e88469c10c696d80afedab63c18d83e56b8.tar.gz
Make fsock module thread-safe
Diffstat (limited to 'main')
-rw-r--r--main/main.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/main/main.c b/main/main.c
index 27c12fc795..fb4ea759d6 100644
--- a/main/main.c
+++ b/main/main.c
@@ -850,16 +850,8 @@ static void php_new_thread_end_handler(THREAD_T thread_id)
static void core_globals_ctor(php_core_globals *core_globals)
{
memset(core_globals,0,sizeof(*core_globals));
- zend_hash_init(&core_globals->ht_fsock_keys, 0, NULL, NULL, 1);
- zend_hash_init(&core_globals->ht_fsock_socks, 0, NULL, (int (*)(void *))php_msock_destroy, 1);
}
-
-static void core_globals_dtor(php_core_globals *core_globals)
-{
- zend_hash_destroy(&core_globals->ht_fsock_keys);
- zend_hash_destroy(&core_globals->ht_fsock_socks);
-}
#endif
@@ -904,7 +896,7 @@ int php_module_startup(sapi_module_struct *sf)
#ifdef ZTS
tsrm_set_new_thread_end_handler(php_new_thread_end_handler);
executor_globals = ts_resource(executor_globals_id);
- core_globals_id = ts_allocate_id(sizeof(php_core_globals), core_globals_ctor, core_globals_dtor);
+ core_globals_id = ts_allocate_id(sizeof(php_core_globals), core_globals_ctor, NULL);
core_globals = ts_resource(core_globals_id);
#endif
EG(error_reporting) = E_ALL & ~E_NOTICE;