Module Name: src
Committed By: skrll
Date: Mon Apr 26 16:35:54 UTC 2021
Modified Files:
src/sys/arch/arm/include: lock.h
Log Message:
Change #ifdef FOO to #if defined(FOO). NFCI.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/include/lock.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/include/lock.h
diff -u src/sys/arch/arm/include/lock.h:1.36 src/sys/arch/arm/include/lock.h:1.37
--- src/sys/arch/arm/include/lock.h:1.36 Sat Apr 24 07:58:12 2021
+++ src/sys/arch/arm/include/lock.h Mon Apr 26 16:35:54 2021
@@ -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 @@ __cpu_simple_lock_set(__cpu_simple_lock_
*__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 @@ __swp(int __val, __cpu_simple_lock_t *__
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 @@ __arm_membar_producer(void)
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 @@ __cpu_simple_lock_init(__cpu_simple_lock
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 @@ void __cpu_simple_lock(__cpu_simple_lock
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 @@ static __inline void __unused
__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");