mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
cleanup TSRMLS_FETCH in ext/opcache
This commit is contained in:
parent
8a7c8d2213
commit
ed6f24b92e
@ -1825,8 +1825,6 @@ static void zend_reset_cache_vars(TSRMLS_D)
|
||||
|
||||
static void accel_activate(void)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (!ZCG(enabled) || !accel_startup_ok) {
|
||||
return;
|
||||
}
|
||||
@ -1938,7 +1936,6 @@ static void accel_fast_zval_dtor(zval *zvalue)
|
||||
if (Z_REFCOUNTED_P(zvalue) && Z_DELREF_P(zvalue) == 0) {
|
||||
switch (Z_TYPE_P(zvalue)) {
|
||||
case IS_ARRAY: {
|
||||
TSRMLS_FETCH();
|
||||
GC_REMOVE_FROM_BUFFER(Z_ARR_P(zvalue));
|
||||
if (Z_ARR_P(zvalue) != &EG(symbol_table)) {
|
||||
/* break possible cycles */
|
||||
@ -1949,15 +1946,11 @@ static void accel_fast_zval_dtor(zval *zvalue)
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
OBJ_RELEASE(Z_OBJ_P(zvalue));
|
||||
}
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
/* destroy resource */
|
||||
zend_list_delete(Z_RES_P(zvalue));
|
||||
}
|
||||
@ -2093,7 +2086,6 @@ static void accel_deactivate(void)
|
||||
* In general, they're restored by persistent_compile_file(), but in case
|
||||
* the script is aborted abnormally, they may become messed up.
|
||||
*/
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (!ZCG(enabled) || !accel_startup_ok) {
|
||||
return;
|
||||
@ -2267,7 +2259,6 @@ static int accel_startup(zend_extension *extension)
|
||||
{
|
||||
zend_function *func;
|
||||
zend_ini_entry *ini_entry;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
#ifdef ZTS
|
||||
accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, (ts_allocate_dtor) accel_globals_dtor);
|
||||
|
@ -188,7 +188,6 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
void *vista_mapping_base_set[] = { (void *) 0x20000000, (void *) 0x21000000, (void *) 0x30000000, (void *) 0x31000000, (void *) 0x50000000, 0 };
|
||||
#endif
|
||||
void **wanted_mapping_base = default_mapping_base_set;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
zend_shared_alloc_lock_win32();
|
||||
/* Mapping retries: When Apache2 restarts, the parent process startup routine
|
||||
|
@ -237,7 +237,6 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
|
||||
char buf[MAXPATHLEN + 1], real_path[MAXPATHLEN + 1], *blacklist_path = NULL;
|
||||
FILE *fp;
|
||||
int path_length, blacklist_path_length;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if ((fp = fopen(filename, "r")) == NULL) {
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Cannot load blacklist file: %s\n", filename);
|
||||
|
@ -34,7 +34,6 @@ void zend_accel_error(int type, const char *format, ...)
|
||||
time_t timestamp;
|
||||
char *time_string;
|
||||
FILE * fLog = NULL;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (type > ZCG(accel_directives).log_verbosity_level) {
|
||||
return;
|
||||
|
@ -50,7 +50,6 @@ static zend_ast *zend_ast_clone(zend_ast *ast TSRMLS_DC);
|
||||
static void zend_accel_destroy_zend_function(zval *zv)
|
||||
{
|
||||
zend_function *function = Z_PTR_P(zv);
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (function->type == ZEND_USER_FUNCTION) {
|
||||
if (function->op_array.static_variables) {
|
||||
@ -350,7 +349,6 @@ static void zend_hash_clone_zval(HashTable *ht, HashTable *source, int bind)
|
||||
uint idx;
|
||||
Bucket *p, *q, *r;
|
||||
zend_ulong nIndex;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
ht->nTableSize = source->nTableSize;
|
||||
ht->nTableMask = source->nTableMask;
|
||||
@ -605,7 +603,6 @@ static void zend_class_copy_ctor(zend_class_entry **pce)
|
||||
zend_class_entry *old_ce = ce;
|
||||
zend_class_entry *new_ce;
|
||||
zend_function *new_func;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
*pce = ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry));
|
||||
*ce = *old_ce;
|
||||
|
@ -157,8 +157,6 @@ int zend_shared_alloc_startup(size_t requested_size)
|
||||
const zend_shared_memory_handler_entry *he;
|
||||
int res = ALLOC_FAILURE;
|
||||
|
||||
TSRMLS_FETCH();
|
||||
|
||||
/* shared_free must be valid before we call zend_shared_alloc()
|
||||
* - make it temporarily point to a local variable
|
||||
*/
|
||||
@ -298,7 +296,6 @@ void *zend_shared_alloc(size_t size)
|
||||
{
|
||||
int i;
|
||||
unsigned int block_size = ZEND_ALIGNED_SIZE(size);
|
||||
TSRMLS_FETCH();
|
||||
|
||||
#if 1
|
||||
if (!ZCG(locked)) {
|
||||
|
Loading…
Reference in New Issue
Block a user