1*09ff5f3bSriastradh /* $NetBSD: atomic_op_asm.h,v 1.6 2022/04/06 22:47:56 riastradh Exp $ */ 2935eacf3Sad 3935eacf3Sad /*- 4935eacf3Sad * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. 5935eacf3Sad * All rights reserved. 6935eacf3Sad * 7935eacf3Sad * This code is derived from software contributed to The NetBSD Foundation 8935eacf3Sad * by Jason R. Thorpe. 9935eacf3Sad * 10935eacf3Sad * Redistribution and use in source and binary forms, with or without 11935eacf3Sad * modification, are permitted provided that the following conditions 12935eacf3Sad * are met: 13935eacf3Sad * 1. Redistributions of source code must retain the above copyright 14935eacf3Sad * notice, this list of conditions and the following disclaimer. 15935eacf3Sad * 2. Redistributions in binary form must reproduce the above copyright 16935eacf3Sad * notice, this list of conditions and the following disclaimer in the 17935eacf3Sad * documentation and/or other materials provided with the distribution. 18935eacf3Sad * 19935eacf3Sad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20935eacf3Sad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21935eacf3Sad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22935eacf3Sad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23935eacf3Sad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24935eacf3Sad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25935eacf3Sad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26935eacf3Sad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27935eacf3Sad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28935eacf3Sad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29935eacf3Sad * POSSIBILITY OF SUCH DAMAGE. 30935eacf3Sad */ 31935eacf3Sad 32935eacf3Sad #ifndef _ATOMIC_OP_ASM_H_ 33935eacf3Sad #define _ATOMIC_OP_ASM_H_ 34935eacf3Sad 35935eacf3Sad #include <machine/asm.h> 36935eacf3Sad 37935eacf3Sad #if defined(_KERNEL) 38935eacf3Sad 39935eacf3Sad #define ATOMIC_OP_ALIAS(a,s) STRONG_ALIAS(a,s) 40b290679aSmartin #ifdef _HARDKERNEL 41b290679aSmartin #define CRT_ALIAS(a,s) STRONG_ALIAS(a,s) 42b290679aSmartin #endif 43935eacf3Sad 44935eacf3Sad #else /* _KERNEL */ 45935eacf3Sad 46935eacf3Sad #define ATOMIC_OP_ALIAS(a,s) WEAK_ALIAS(a,s) 47b290679aSmartin #ifdef _LIBC 48b290679aSmartin #define CRT_ALIAS(a,s) STRONG_ALIAS(a,s) 49b290679aSmartin #endif 50935eacf3Sad 51935eacf3Sad #endif /* _KERNEL */ 52935eacf3Sad 53b290679aSmartin #ifndef CRT_ALIAS 54b290679aSmartin #define CRT_ALIAS(a,s) 55b290679aSmartin #endif 56b290679aSmartin 57935eacf3Sad #endif /* _ATOMIC_OP_ASM_H_ */ 58