git: 590e7a0eb5b9 - main - rangelock: Use atomic_testandset_ptr
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Nov 2024 15:28:46 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=590e7a0eb5b96225a2b856403b731ed9b063c030 commit 590e7a0eb5b96225a2b856403b731ed9b063c030 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-11-19 15:25:08 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-11-19 15:25:08 +0000 rangelock: Use atomic_testandset_ptr Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D47632 --- sys/kern/kern_rangelock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 3437e3da77ba..59112acfb03d 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -364,8 +364,8 @@ rl_e_unmark(const struct rl_q_entry *e) static void rl_e_mark(struct rl_q_entry *e) { -#if defined(INVARIANTS) && defined(__LP64__) - int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); +#if defined(INVARIANTS) + int r = atomic_testandset_ptr((uintptr_t *)&e->rl_q_next, 0); MPASS(r == 0); #else atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1);