Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include Change #ifdef FOO to #if defined(FOO). ...
details: https://anonhg.NetBSD.org/src/rev/89daa2a41adc
branches: trunk
changeset: 982798:89daa2a41adc
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Apr 26 16:35:54 2021 +0000
description:
Change #ifdef FOO to #if defined(FOO). NFCI.
diffstat:
sys/arch/arm/include/lock.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 9a96827b204b -r 89daa2a41adc sys/arch/arm/include/lock.h
--- a/sys/arch/arm/include/lock.h Mon Apr 26 15:38:11 2021 +0000
+++ b/sys/arch/arm/include/lock.h Mon Apr 26 16:35:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.36 2021/04/24 07:58:12 skrll Exp $ */
+/* $NetBSD: lock.h,v 1.37 2021/04/26 16:35:54 skrll Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*__ptr = __SIMPLELOCK_LOCKED;
}
-#ifdef _ARM_ARCH_6
+#if defined(_ARM_ARCH_6)
static __inline unsigned int
__arm_load_exclusive(__cpu_simple_lock_t *__alp)
{
@@ -134,7 +134,7 @@
static __inline void
__arm_membar_producer(void)
{
-#ifdef _ARM_ARCH_7
+#if defined(_ARM_ARCH_7)
__asm __volatile("dsb" ::: "memory");
#elif defined(_ARM_ARCH_6)
__asm __volatile("mcr\tp15,0,%0,c7,c10,4" :: "r"(0) : "memory");
@@ -144,7 +144,7 @@
static __inline void
__arm_membar_consumer(void)
{
-#ifdef _ARM_ARCH_7
+#if defined(_ARM_ARCH_7)
__asm __volatile("dmb" ::: "memory");
#elif defined(_ARM_ARCH_6)
__asm __volatile("mcr\tp15,0,%0,c7,c10,5" :: "r"(0) : "memory");
@@ -163,7 +163,7 @@
static __inline void __unused
__cpu_simple_lock(__cpu_simple_lock_t *__alp)
{
-#ifdef _ARM_ARCH_6
+#if defined(_ARM_ARCH_6)
__arm_membar_consumer();
do {
/* spin */
@@ -183,7 +183,7 @@
static __inline int __unused
__cpu_simple_lock_try(__cpu_simple_lock_t *__alp)
{
-#ifdef _ARM_ARCH_6
+#if defined(_ARM_ARCH_6)
__arm_membar_consumer();
do {
if (__arm_load_exclusive(__alp) != __SIMPLELOCK_UNLOCKED) {
@@ -204,7 +204,7 @@
__cpu_simple_unlock(__cpu_simple_lock_t *__alp)
{
-#ifdef _ARM_ARCH_8
+#if defined(_ARM_ARCH_8)
if (sizeof(*__alp) == 1) {
__asm __volatile("stlrb\t%w0, [%1]"
:: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
Home |
Main Index |
Thread Index |
Old Index