Skip to content

Commit ed6f24b

Browse files
committed
cleanup TSRMLS_FETCH in ext/opcache
1 parent 8a7c8d2 commit ed6f24b

6 files changed

+0
-18
lines changed

ext/opcache/ZendAccelerator.c

-9
Original file line numberDiff line numberDiff line change
@@ -1825,8 +1825,6 @@ static void zend_reset_cache_vars(TSRMLS_D)
18251825

18261826
static void accel_activate(void)
18271827
{
1828-
TSRMLS_FETCH();
1829-
18301828
if (!ZCG(enabled) || !accel_startup_ok) {
18311829
return;
18321830
}
@@ -1938,7 +1936,6 @@ static void accel_fast_zval_dtor(zval *zvalue)
19381936
if (Z_REFCOUNTED_P(zvalue) && Z_DELREF_P(zvalue) == 0) {
19391937
switch (Z_TYPE_P(zvalue)) {
19401938
case IS_ARRAY: {
1941-
TSRMLS_FETCH();
19421939
GC_REMOVE_FROM_BUFFER(Z_ARR_P(zvalue));
19431940
if (Z_ARR_P(zvalue) != &EG(symbol_table)) {
19441941
/* break possible cycles */
@@ -1949,15 +1946,11 @@ static void accel_fast_zval_dtor(zval *zvalue)
19491946
break;
19501947
case IS_OBJECT:
19511948
{
1952-
TSRMLS_FETCH();
1953-
19541949
OBJ_RELEASE(Z_OBJ_P(zvalue));
19551950
}
19561951
break;
19571952
case IS_RESOURCE:
19581953
{
1959-
TSRMLS_FETCH();
1960-
19611954
/* destroy resource */
19621955
zend_list_delete(Z_RES_P(zvalue));
19631956
}
@@ -2093,7 +2086,6 @@ static void accel_deactivate(void)
20932086
* In general, they're restored by persistent_compile_file(), but in case
20942087
* the script is aborted abnormally, they may become messed up.
20952088
*/
2096-
TSRMLS_FETCH();
20972089

20982090
if (!ZCG(enabled) || !accel_startup_ok) {
20992091
return;
@@ -2267,7 +2259,6 @@ static int accel_startup(zend_extension *extension)
22672259
{
22682260
zend_function *func;
22692261
zend_ini_entry *ini_entry;
2270-
TSRMLS_FETCH();
22712262

22722263
#ifdef ZTS
22732264
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);

ext/opcache/shared_alloc_win32.c

-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
188188
void *vista_mapping_base_set[] = { (void *) 0x20000000, (void *) 0x21000000, (void *) 0x30000000, (void *) 0x31000000, (void *) 0x50000000, 0 };
189189
#endif
190190
void **wanted_mapping_base = default_mapping_base_set;
191-
TSRMLS_FETCH();
192191

193192
zend_shared_alloc_lock_win32();
194193
/* Mapping retries: When Apache2 restarts, the parent process startup routine

ext/opcache/zend_accelerator_blacklist.c

-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
237237
char buf[MAXPATHLEN + 1], real_path[MAXPATHLEN + 1], *blacklist_path = NULL;
238238
FILE *fp;
239239
int path_length, blacklist_path_length;
240-
TSRMLS_FETCH();
241240

242241
if ((fp = fopen(filename, "r")) == NULL) {
243242
zend_accel_error(ACCEL_LOG_WARNING, "Cannot load blacklist file: %s\n", filename);

ext/opcache/zend_accelerator_debug.c

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ void zend_accel_error(int type, const char *format, ...)
3434
time_t timestamp;
3535
char *time_string;
3636
FILE * fLog = NULL;
37-
TSRMLS_FETCH();
3837

3938
if (type > ZCG(accel_directives).log_verbosity_level) {
4039
return;

ext/opcache/zend_accelerator_util_funcs.c

-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ static zend_ast *zend_ast_clone(zend_ast *ast TSRMLS_DC);
5050
static void zend_accel_destroy_zend_function(zval *zv)
5151
{
5252
zend_function *function = Z_PTR_P(zv);
53-
TSRMLS_FETCH();
5453

5554
if (function->type == ZEND_USER_FUNCTION) {
5655
if (function->op_array.static_variables) {
@@ -350,7 +349,6 @@ static void zend_hash_clone_zval(HashTable *ht, HashTable *source, int bind)
350349
uint idx;
351350
Bucket *p, *q, *r;
352351
zend_ulong nIndex;
353-
TSRMLS_FETCH();
354352

355353
ht->nTableSize = source->nTableSize;
356354
ht->nTableMask = source->nTableMask;
@@ -605,7 +603,6 @@ static void zend_class_copy_ctor(zend_class_entry **pce)
605603
zend_class_entry *old_ce = ce;
606604
zend_class_entry *new_ce;
607605
zend_function *new_func;
608-
TSRMLS_FETCH();
609606

610607
*pce = ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry));
611608
*ce = *old_ce;

ext/opcache/zend_shared_alloc.c

-3
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ int zend_shared_alloc_startup(size_t requested_size)
157157
const zend_shared_memory_handler_entry *he;
158158
int res = ALLOC_FAILURE;
159159

160-
TSRMLS_FETCH();
161-
162160
/* shared_free must be valid before we call zend_shared_alloc()
163161
* - make it temporarily point to a local variable
164162
*/
@@ -298,7 +296,6 @@ void *zend_shared_alloc(size_t size)
298296
{
299297
int i;
300298
unsigned int block_size = ZEND_ALIGNED_SIZE(size);
301-
TSRMLS_FETCH();
302299

303300
#if 1
304301
if (!ZCG(locked)) {

0 commit comments

Comments
 (0)