Deleted Added
full compact
bitops.h (271127) bitops.h (282513)
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 274 unchanged lines hidden (view full) ---

283 if ((addr[i] & mask) != 0)
284 return (0);
285 }
286 return (1);
287}
288
289#define NBLONG (NBBY * sizeof(long))
290
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 274 unchanged lines hidden (view full) ---

283 if ((addr[i] & mask) != 0)
284 return (0);
285 }
286 return (1);
287}
288
289#define NBLONG (NBBY * sizeof(long))
290
291#define __set_bit(i, a) \
292 atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
293
291#define set_bit(i, a) \
292 atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
293
294#define set_bit(i, a) \
295 atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
296
297#define __clear_bit(i, a) \
298 atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
299
294#define clear_bit(i, a) \
295 atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
296
297#define test_bit(i, a) \
298 !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \
299 (1UL << ((i) % NBLONG)))
300
301static inline long

--- 211 unchanged lines hidden ---
300#define clear_bit(i, a) \
301 atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG))
302
303#define test_bit(i, a) \
304 !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \
305 (1UL << ((i) % NBLONG)))
306
307static inline long

--- 211 unchanged lines hidden ---