Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/include Fix compile error. Use const corre...



details:   https://anonhg.NetBSD.org/src/rev/17b8ba1e8fc1
branches:  trunk
changeset: 827298:17b8ba1e8fc1
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Oct 23 06:43:00 2017 +0000

description:
Fix compile error. Use const correctly.

diffstat:

 sys/arch/usermode/include/lock.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r edbc9dd49c15 -r 17b8ba1e8fc1 sys/arch/usermode/include/lock.h
--- a/sys/arch/usermode/include/lock.h  Mon Oct 23 06:00:59 2017 +0000
+++ b/sys/arch/usermode/include/lock.h  Mon Oct 23 06:43:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.4 2017/09/17 00:01:08 christos Exp $ */
+/* $NetBSD: lock.h,v 1.5 2017/10/23 06:43:00 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,13 +30,13 @@
 #define _ARCH_USERMODE_INCLUDE_LOCK_H
 
 __inline static void
-__cpu_simple_lock_init(const __cpu_simple_lock_t *lockp)
+__cpu_simple_lock_init(__cpu_simple_lock_t *lockp)
 {
        *lockp = __SIMPLELOCK_UNLOCKED;
 }
 
 __inline static int
-__cpu_simple_lock_try(const __cpu_simple_lock_t *lockp)
+__cpu_simple_lock_try(__cpu_simple_lock_t *lockp)
 {
        if (*lockp == __SIMPLELOCK_LOCKED)
                return 0;
@@ -58,13 +58,13 @@
 }
 
 __inline static int
-__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *lockp)
+__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *lockp)
 {
        return *lockp == __SIMPLELOCK_LOCKED;
 }
 
 __inline static int
-__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *lockp)
+__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *lockp)
 {
        return *lockp == __SIMPLELOCK_UNLOCKED;
 }



Home | Main Index | Thread Index | Old Index