com php-src: fix incrementing on 32-bit: ext/opcache/ZendAccelerator.c
| From: | Anatol Belski | Date: | Sun, 04 Oct 2015 10:19:16 +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-89287@lists.php.net to get a copy of this message | ||
Commit: c97198e18145fd1f90a4b09979cbec25afa20afd
Author: Anatol Belski <ab@php.net> Sun, 4 Oct 2015 12:16:54 +0200
Parents: ba4a85b012c702d3538b70094f6c8bc898cc815e
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c97198e18145fd1f90a4b09979cbec25afa20afd
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