From b1730c99f882fc2662c6b64371a4b11a8231bb9f Mon Sep 17 00:00:00 2001 From: Agustina Arzille Date: Mon, 3 Apr 2017 16:09:51 +0200 Subject: Use the new atomic operations interface Stick to a sequentially consistent model for most atomic operations as it matches the semantics of the existing code. Each call site will have to be reevaluated in order to switch to more relaxed accesses where possible. --- kern/bitmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kern/bitmap.h') diff --git a/kern/bitmap.h b/kern/bitmap.h index 77dfac1b..6b7f2d79 100644 --- a/kern/bitmap.h +++ b/kern/bitmap.h @@ -26,9 +26,9 @@ #include +#include #include #include -#include #define BITMAP_DECLARE(name, nr_bits) unsigned long name[BITMAP_LONGS(nr_bits)] @@ -78,7 +78,7 @@ bitmap_set_atomic(unsigned long *bm, int bit) bitmap_lookup(bm, bit); } - atomic_or_ulong(bm, bitmap_mask(bit)); + atomic_or(bm, bitmap_mask(bit), ATOMIC_SEQ_CST); } static inline void @@ -98,7 +98,7 @@ bitmap_clear_atomic(unsigned long *bm, int bit) bitmap_lookup(bm, bit); } - atomic_and_ulong(bm, ~bitmap_mask(bit)); + atomic_and(bm, ~bitmap_mask(bit), ATOMIC_SEQ_CST); } static inline int -- cgit v1.2.3