Skip to content

Commit 19165ed

Browse files
committed
Fix zend_atomic windows arm64 build
use underscored version instead
1 parent fe45189 commit 19165ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Zend/zend_atomic.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ BEGIN_EXTERN_C()
6060
#define ZEND_ATOMIC_BOOL_INIT(obj, desired) ((obj)->value = (desired))
6161

6262
static zend_always_inline bool zend_atomic_bool_exchange_ex(zend_atomic_bool *obj, bool desired) {
63-
return InterlockedExchange8(&obj->value, desired);
63+
return _InterlockedExchange8(&obj->value, desired);
6464
}
6565

6666
/* On this platform it is non-const due to Iterlocked API*/
67-
static zend_always_inline bool zend_atomic_bool_load_ex(zend_atomic_bool *obj) {
67+
static zend_always_inline bool zend_atomic_bool_load_ex(const zend_atomic_bool *obj) {
6868
/* Or'ing with false won't change the value. */
69-
return InterlockedOr8(&obj->value, false);
69+
return _InterlockedOr8(&obj->value, false);
7070
}
7171

7272
static zend_always_inline void zend_atomic_bool_store_ex(zend_atomic_bool *obj, bool desired) {
73-
(void)InterlockedExchange8(&obj->value, desired);
73+
(void)_InterlockedExchange8(&obj->value, desired);
7474
}
7575

7676
#elif HAVE_C11_ATOMICS
@@ -123,7 +123,7 @@ static zend_always_inline bool zend_atomic_bool_exchange_ex(zend_atomic_bool *ob
123123
return prev;
124124
}
125125

126-
static zend_always_inline bool zend_atomic_bool_load_ex(zend_atomic_bool *obj) {
126+
static zend_always_inline bool zend_atomic_bool_load_ex(const zend_atomic_bool *obj) {
127127
/* Or'ing false won't change the value */
128128
return __sync_fetch_and_or(&obj->value, false);
129129
}

0 commit comments

Comments
 (0)