xref: /netbsd-src/common/lib/libc/arch/mips/atomic/atomic_op_asm.h (revision 05a5e24cff47f3d7cded750e448a4213232a03f1)
1*05a5e24cSriastradh /*	$NetBSD: atomic_op_asm.h,v 1.5 2022/02/27 19:21:53 riastradh Exp $	*/
2234aa623Sad 
3234aa623Sad /*-
4234aa623Sad  * Copyright (c) 2007 The NetBSD Foundation, Inc.
5234aa623Sad  * All rights reserved.
6234aa623Sad  *
7234aa623Sad  * This code is derived from software contributed to The NetBSD Foundation
8234aa623Sad  * by Jason R. Thorpe.
9234aa623Sad  *
10234aa623Sad  * Redistribution and use in source and binary forms, with or without
11234aa623Sad  * modification, are permitted provided that the following conditions
12234aa623Sad  * are met:
13234aa623Sad  * 1. Redistributions of source code must retain the above copyright
14234aa623Sad  *    notice, this list of conditions and the following disclaimer.
15234aa623Sad  * 2. Redistributions in binary form must reproduce the above copyright
16234aa623Sad  *    notice, this list of conditions and the following disclaimer in the
17234aa623Sad  *    documentation and/or other materials provided with the distribution.
18234aa623Sad  *
19234aa623Sad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20234aa623Sad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21234aa623Sad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22234aa623Sad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23234aa623Sad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24234aa623Sad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25234aa623Sad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26234aa623Sad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27234aa623Sad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28234aa623Sad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29234aa623Sad  * POSSIBILITY OF SUCH DAMAGE.
30234aa623Sad  */
31234aa623Sad 
32234aa623Sad #ifndef _ATOMIC_OP_ASM_H_
33234aa623Sad #define	_ATOMIC_OP_ASM_H_
34234aa623Sad 
35234aa623Sad #include <machine/asm.h>
36234aa623Sad 
37234aa623Sad #if defined(_KERNEL)
38234aa623Sad 
39234aa623Sad #define	ATOMIC_OP_ALIAS(a,s)	STRONG_ALIAS(a,s)
40234aa623Sad 
41234aa623Sad #else /* _KERNEL */
42234aa623Sad 
43234aa623Sad #define	ATOMIC_OP_ALIAS(a,s)	WEAK_ALIAS(a,s)
44234aa623Sad 
45234aa623Sad #endif /* _KERNEL */
46234aa623Sad 
47234aa623Sad #endif /* _ATOMIC_OP_ASM_H_ */
48