mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-19 06:01:11 +00:00
Add cmpxchg16b
This commit is contained in:
8
core/simd/x86/cmpxchg16b.odin
Normal file
8
core/simd/x86/cmpxchg16b.odin
Normal file
@@ -0,0 +1,8 @@
|
||||
//+build amd64
|
||||
package simd_x86
|
||||
|
||||
import "core:intrinsics"
|
||||
|
||||
cmpxchg16b :: #force_inline proc "c" (dst: ^u128, old, new: u128, $success, $failure: intrinsics.Atomic_Memory_Order) -> (val: u128) {
|
||||
return intrinsics.atomic_compare_exchange_strong_explicit(dst, old, new, success, failure)
|
||||
}
|
||||
Reference in New Issue
Block a user