com php-src: fix incrementing on 32-bit: ext/opcache/ZendAccelerator.c
| From: | Anatol Belski | Date: | Sun, 04 Oct 2015 10:16:54 +0000 |
| Subject: | com php-src: fix incrementing on 32-bit: ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89286@lists.php.net to get a copy of this message | ||
Commit: 96ac35758115caff660b4a7086daa34adee826be
Author: Anatol Belski <ab@php.net> Sun, 4 Oct 2015 12:16:54 +0200
Parents: 2a54b0225791b694491a6fd44eb490f95998c7f1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=96ac35758115caff660b4a7086daa34adee826be
Log:
fix incrementing on 32-bit
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 3fa015e..862a853 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1804,7 +1804,11 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int
type)
ZCSG(hits)++; /* TBFixed: may lose one hit */
persistent_script->dynamic_members.hits++; /* see above */
#else
- INCREMENT(hits);
+#ifdef _M_X64
+ InterlockedIncrement64(&ZCSG(hits));
+#else
+ InterlockedIncrement(&ZCSG(hits));
+#endif
InterlockedIncrement64(&persistent_script->dynamic_members.hits);
#endif