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 add constcond.



details:   https://anonhg.NetBSD.org/src/rev/93f33da630c9
branches:  trunk
changeset: 335290:93f33da630c9
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 02 02:00:15 2015 +0000

description:
add constcond.

diffstat:

 sys/arch/arm/include/lock.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 302a01753663 -r 93f33da630c9 sys/arch/arm/include/lock.h
--- a/sys/arch/arm/include/lock.h       Fri Jan 02 01:14:22 2015 +0000
+++ b/sys/arch/arm/include/lock.h       Fri Jan 02 02:00:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.28 2014/08/10 06:23:13 matt Exp $   */
+/*     $NetBSD: lock.h,v 1.29 2015/01/02 02:00:15 christos Exp $       */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
 __arm_load_exclusive(__cpu_simple_lock_t *__alp)
 {
        unsigned int __rv;
-       if (sizeof(*__alp) == 1) {
+       if (/*CONSTCOND*/sizeof(*__alp) == 1) {
                __asm __volatile("ldrexb\t%0,[%1]" : "=r"(__rv) : "r"(__alp));
        } else {
                __asm __volatile("ldrex\t%0,[%1]" : "=r"(__rv) : "r"(__alp));
@@ -91,7 +91,7 @@
 __arm_store_exclusive(__cpu_simple_lock_t *__alp, unsigned int __val)
 {
        unsigned int __rv;
-       if (sizeof(*__alp) == 1) {
+       if (/*CONSTCOND*/sizeof(*__alp) == 1) {
                __asm __volatile("strexb\t%0,%1,[%2]"
                    : "=&r"(__rv) : "r"(__val), "r"(__alp) : "cc", "memory");
        } else {



Home | Main Index | Thread Index | Old Index