more const.

This commit is contained in:
christos 2017-09-17 00:01:07 +00:00
parent 35823e7391
commit 9c6f304208
12 changed files with 36 additions and 36 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.28 2009/11/25 14:28:50 rmind Exp $ */
/* $NetBSD: lock.h,v 1.29 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -42,13 +42,13 @@
#endif
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.32 2015/02/25 13:52:42 joerg Exp $ */
/* $NetBSD: lock.h,v 1.33 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -42,13 +42,13 @@
#define _ARM_LOCK_H_
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.19 2017/01/15 18:03:12 christos Exp $ */
/* $NetBSD: lock.h,v 1.20 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -49,13 +49,13 @@
#define __SIMPLELOCK_RAW_UNLOCKED 1UL
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__SIMPLELOCK_ALIGN(__ptr) == __SIMPLELOCK_RAW_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__SIMPLELOCK_ALIGN(__ptr) == __SIMPLELOCK_RAW_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.5 2016/08/05 16:59:26 scole Exp $ */
/* $NetBSD: lock.h,v 1.6 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,13 +37,13 @@
#define _IA64_LOCK_H_
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.14 2008/04/28 20:23:26 martin Exp $ */
/* $NetBSD: lock.h,v 1.15 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,13 +37,13 @@
#define _M68K_LOCK_H_
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.19 2015/06/01 22:55:13 matt Exp $ */
/* $NetBSD: lock.h,v 1.20 2017/09/17 00:01:07 christos Exp $ */
/*-
* Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@ -42,13 +42,13 @@
#include <sys/param.h>
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr != __SIMPLELOCK_UNLOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.1 2014/09/03 19:34:26 matt Exp $ */
/* $NetBSD: lock.h,v 1.2 2017/09/17 00:01:08 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -36,13 +36,13 @@
#define _OR1K_LOCK_H_
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr != __SIMPLELOCK_UNLOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.12 2008/04/28 20:23:32 martin Exp $ */
/* $NetBSD: lock.h,v 1.13 2017/09/17 00:01:08 christos Exp $ */
/*-
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@ -37,13 +37,13 @@
#define _POWERPC_LOCK_H_
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.16 2009/10/13 12:55:53 uwe Exp $ */
/* $NetBSD: lock.h,v 1.17 2017/09/17 00:01:08 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -46,13 +46,13 @@ static __inline void __cpu_simple_unlock(__cpu_simple_lock_t *)
__attribute__((__unused__));
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.31 2008/04/28 20:23:36 martin Exp $ */
/* $NetBSD: lock.h,v 1.32 2017/09/17 00:01:08 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2006 The NetBSD Foundation, Inc.
@ -72,13 +72,13 @@ extern void __cpu_simple_lock(__cpu_simple_lock_t *);
#endif
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.3 2011/08/13 10:31:24 jmcneill Exp $ */
/* $NetBSD: lock.h,v 1.4 2017/09/17 00:01:08 christos Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@ -30,13 +30,13 @@
#define _ARCH_USERMODE_INCLUDE_LOCK_H
__inline static void
__cpu_simple_lock_init(__cpu_simple_lock_t *lockp)
__cpu_simple_lock_init(const __cpu_simple_lock_t *lockp)
{
*lockp = __SIMPLELOCK_UNLOCKED;
}
__inline static int
__cpu_simple_lock_try(__cpu_simple_lock_t *lockp)
__cpu_simple_lock_try(const __cpu_simple_lock_t *lockp)
{
if (*lockp == __SIMPLELOCK_LOCKED)
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.h,v 1.30 2017/05/22 17:12:11 ragge Exp $ */
/* $NetBSD: lock.h,v 1.31 2017/09/17 00:01:08 christos Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
@ -39,13 +39,13 @@
#endif
static __inline int
__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_LOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_LOCKED;
}
static __inline int
__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr)
__SIMPLELOCK_UNLOCKED_P(const __cpu_simple_lock_t *__ptr)
{
return *__ptr == __SIMPLELOCK_UNLOCKED;
}