diff options
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
| -rw-r--r-- | ext/opcache/ZendAccelerator.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index f1dc0e185c..222935bad0 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -97,7 +97,7 @@ zend_accel_globals accel_globals; #else int accel_globals_id; #if defined(COMPILE_DL_OPCACHE) -ZEND_TSRMLS_CACHE_DEFINE(); +ZEND_TSRMLS_CACHE_DEFINE() #endif #endif @@ -225,7 +225,11 @@ static inline void accel_restart_enter(void) #ifdef ZEND_WIN32 INCREMENT(restart_in); #else +# ifdef _AIX + static FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1); +# else static const FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1); +#endif if (fcntl(lock_file, F_SETLK, &restart_in_progress) == -1) { zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(+1): %s (%d)", strerror(errno), errno); @@ -240,7 +244,11 @@ static inline void accel_restart_leave(void) ZCSG(restart_in_progress) = 0; DECREMENT(restart_in); #else +# ifdef _AIX + static FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1); +# else static const FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1); +# endif ZCSG(restart_in_progress) = 0; if (fcntl(lock_file, F_SETLK, &restart_finished) == -1) { @@ -278,7 +286,11 @@ static inline int accel_activate_add(void) #ifdef ZEND_WIN32 INCREMENT(mem_usage); #else +# ifdef _AIX + static FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1); +# else static const FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1); +# endif if (fcntl(lock_file, F_SETLK, &mem_usage_lock) == -1) { zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(+1): %s (%d)", strerror(errno), errno); @@ -297,7 +309,11 @@ static inline void accel_deactivate_sub(void) ZCG(counted) = 0; } #else +# ifdef _AIX + static FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1); +# else static const FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1); +# endif if (fcntl(lock_file, F_SETLK, &mem_usage_unlock) == -1) { zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(-1): %s (%d)", strerror(errno), errno); @@ -310,7 +326,11 @@ static inline void accel_unlock_all(void) #ifdef ZEND_WIN32 accel_deactivate_sub(); #else +# ifdef _AIX + static FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0); +# else static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0); +# endif if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) { zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll: %s (%d)", strerror(errno), errno); @@ -503,6 +523,9 @@ static void accel_use_shm_interned_strings(void) s[1] = 0; CG(one_char_string)[j] = accel_new_interned_string(zend_string_init(s, 1, 0)); } + for (j = 0; j < CG(known_strings_count); j++) { + CG(known_strings)[j] = accel_new_interned_string(CG(known_strings)[j]); + } /* function table hash keys */ for (idx = 0; idx < CG(function_table)->nNumUsed; idx++) { @@ -2918,7 +2941,7 @@ void accelerator_shm_read_unlock(void) ZEND_EXT_API zend_extension zend_extension_entry = { ACCELERATOR_PRODUCT_NAME, /* name */ - ACCELERATOR_VERSION, /* version */ + PHP_VERSION, /* version */ "Zend Technologies", /* author */ "http://www.zend.com/", /* URL */ "Copyright (c) 1999-2016", /* copyright */ |
