Module Name: src Committed By: msaitoh Date: Mon Oct 23 06:43:00 UTC 2017
Modified Files: src/sys/arch/usermode/include: lock.h Log Message: Fix compile error. Use const correctly. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/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/usermode/include/lock.h diff -u src/sys/arch/usermode/include/lock.h:1.4 src/sys/arch/usermode/include/lock.h:1.5 --- src/sys/arch/usermode/include/lock.h:1.4 Sun Sep 17 00:01:08 2017 +++ src/sys/arch/usermode/include/lock.h Mon Oct 23 06:43:00 2017 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ __cpu_simple_unlock(__cpu_simple_lock_t } __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; }