Skip to content

Commit 753a348

Browse files
authored
Fix a compilation error about calling os_atomic_cmpxchg (#4822)
``` /workspaces/wasm-micro-runtime/core/iwasm/aot/aot_runtime.c:4701:30: error: expected expression return os_atomic_cmpxchg(_Atomic(void *)ptr, &old_val, new_val); ^ /workspaces/wasm-micro-runtime/core/shared/utils/../platform/include/platform_api_extension.h:135:27: note: expanded from macro 'os_atomic_cmpxchg' ```
1 parent 55699a7 commit 753a348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/iwasm/aot/aot_runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4699,7 +4699,7 @@ static bool
46994699
cmpxchg_ptr(void **ptr, void *old_val, void *new_val)
47004700
{
47014701
#if defined(os_atomic_cmpxchg)
4702-
return os_atomic_cmpxchg(ptr, &old_val, new_val);
4702+
return os_atomic_cmpxchg((_Atomic(void *) *)ptr, &old_val, new_val);
47034703
#else
47044704
/* TODO: add lock when thread-manager is enabled */
47054705
void *read = *ptr;

0 commit comments

Comments
 (0)