fix arch_try_cmpxchg macro declaration (#307)

fix arch_try_cmpxchg in atomic_cmpxchg

Co-authored-by: Yao Zhao <dragonlinux@gmail.com>
This commit is contained in:
zhaoyao73
2023-07-28 03:44:45 -04:00
committed by GitHub
parent a30434f520
commit 7cc4a02c7f
2 changed files with 5 additions and 5 deletions

View File

@ -102,6 +102,6 @@ inline void atomic_clear_mask(atomic_t *ato, long mask)
// cmpxchgq 比较并交换
inline long atomic_cmpxchg(atomic_t *ato, long oldval, long newval)
{
bool success = arch_try_cmpxchg(&ato->value, &oldval, &newval);
bool success = arch_try_cmpxchg(&ato->value, &oldval, newval);
return success ? oldval : newval;
}
}