atomic-v4.h (290648) | atomic-v4.h (291426) |
---|---|
1/* $NetBSD: atomic.h,v 1.1 2002/10/19 12:22:34 bsh Exp $ */ 2 3/*- 4 * Copyright (C) 2003-2004 Olivier Houchard 5 * Copyright (C) 1994-1997 Mark Brinicombe 6 * Copyright (C) 1994 Brini 7 * All rights reserved. 8 * --- 19 unchanged lines hidden (view full) --- 28 * IN NO EVENT SHALL BRINI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 31 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 32 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 33 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 * | 1/* $NetBSD: atomic.h,v 1.1 2002/10/19 12:22:34 bsh Exp $ */ 2 3/*- 4 * Copyright (C) 2003-2004 Olivier Houchard 5 * Copyright (C) 1994-1997 Mark Brinicombe 6 * Copyright (C) 1994 Brini 7 * All rights reserved. 8 * --- 19 unchanged lines hidden (view full) --- 28 * IN NO EVENT SHALL BRINI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 31 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 32 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 33 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 * |
36 * $FreeBSD: head/sys/arm/include/atomic-v4.h 290648 2015-11-10 12:02:41Z mmel $ | 36 * $FreeBSD: head/sys/arm/include/atomic-v4.h 291426 2015-11-28 12:12:28Z mmel $ |
37 */ 38 39#ifndef _MACHINE_ATOMIC_V4_H_ 40#define _MACHINE_ATOMIC_V4_H_ 41 42#ifndef _MACHINE_ATOMIC_H_ 43#error Do not include this file directly, use <machine/atomic.h> 44#endif --- 313 unchanged lines hidden (view full) --- 358 359static __inline uint32_t 360atomic_readandclear_32(volatile u_int32_t *p) 361{ 362 363 return (__swp(0, p)); 364} 365 | 37 */ 38 39#ifndef _MACHINE_ATOMIC_V4_H_ 40#define _MACHINE_ATOMIC_V4_H_ 41 42#ifndef _MACHINE_ATOMIC_H_ 43#error Do not include this file directly, use <machine/atomic.h> 44#endif --- 313 unchanged lines hidden (view full) --- 358 359static __inline uint32_t 360atomic_readandclear_32(volatile u_int32_t *p) 361{ 362 363 return (__swp(0, p)); 364} 365 |
366static __inline uint32_t 367atomic_swap_32(volatile u_int32_t *p, u_int32_t v) 368{ 369 370 return (__swp(v, p)); 371} 372 |
|
366#define atomic_cmpset_rel_32 atomic_cmpset_32 367#define atomic_cmpset_acq_32 atomic_cmpset_32 368#define atomic_set_rel_32 atomic_set_32 369#define atomic_set_acq_32 atomic_set_32 370#define atomic_clear_rel_32 atomic_clear_32 371#define atomic_clear_acq_32 atomic_clear_32 372#define atomic_add_rel_32 atomic_add_32 373#define atomic_add_acq_32 atomic_add_32 --- 102 unchanged lines hidden --- | 373#define atomic_cmpset_rel_32 atomic_cmpset_32 374#define atomic_cmpset_acq_32 atomic_cmpset_32 375#define atomic_set_rel_32 atomic_set_32 376#define atomic_set_acq_32 atomic_set_32 377#define atomic_clear_rel_32 atomic_clear_32 378#define atomic_clear_acq_32 atomic_clear_32 379#define atomic_add_rel_32 atomic_add_32 380#define atomic_add_acq_32 atomic_add_32 --- 102 unchanged lines hidden --- |