]> granicus.if.org Git - php/commitdiff
fix incrementing on 32-bit
authorAnatol Belski <ab@php.net>
Sun, 4 Oct 2015 10:16:54 +0000 (12:16 +0200)
committerAnatol Belski <ab@php.net>
Sun, 4 Oct 2015 10:16:54 +0000 (12:16 +0200)
ext/opcache/ZendAccelerator.c

index 3fa015e162fee1be397c03cffbd643931a07487c..862a85389fc10cb6a77706a19fe2671a68d6e012 100644 (file)
@@ -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