Fix memory_order_release in __zipos_seek (#975)

This commit is contained in:
Jōshin 2023-12-01 05:28:15 -05:00 committed by GitHub
parent d95d61b1af
commit a0f599ce12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ int64_t __zipos_seek(struct ZiposHandle *h, int64_t offset, unsigned whence) {
new_pos = einval();
}
if (LIKELY(atomic_compare_exchange_weak_explicit(
&h->pos, &pos, new_pos < 0 ? pos : new_pos, memory_order_acquire,
&h->pos, &pos, new_pos < 0 ? pos : new_pos, memory_order_release,
memory_order_relaxed))) {
break;
}