Module Name: src Committed By: ozaki-r Date: Mon Dec 25 09:13:40 UTC 2017
Modified Files: src/sys/kern: kern_condvar.c kern_lock.c kern_mutex.c kern_rwlock.c src/sys/rump/librump/rumpkern: locks.c Log Message: Apply C99-style struct initialization to lockops_t To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_condvar.c cvs rdiff -u -r1.160 -r1.161 src/sys/kern/kern_lock.c cvs rdiff -u -r1.67 -r1.68 src/sys/kern/kern_mutex.c cvs rdiff -u -r1.47 -r1.48 src/sys/kern/kern_rwlock.c cvs rdiff -u -r1.75 -r1.76 src/sys/rump/librump/rumpkern/locks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/kern_condvar.c diff -u src/sys/kern/kern_condvar.c:1.39 src/sys/kern/kern_condvar.c:1.40 --- src/sys/kern/kern_condvar.c:1.39 Sun Nov 12 20:04:51 2017 +++ src/sys/kern/kern_condvar.c Mon Dec 25 09:13:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_condvar.c,v 1.39 2017/11/12 20:04:51 riastradh Exp $ */ +/* $NetBSD: kern_condvar.c,v 1.40 2017/12/25 09:13:40 ozaki-r Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.39 2017/11/12 20:04:51 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.40 2017/12/25 09:13:40 ozaki-r Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -79,9 +79,9 @@ static syncobj_t cv_syncobj = { }; lockops_t cv_lockops = { - "Condition variable", - LOCKOPS_CV, - NULL + .lo_name = "Condition variable", + .lo_type = LOCKOPS_CV, + .lo_dump = NULL, }; static const char deadcv[] = "deadcv"; Index: src/sys/kern/kern_lock.c diff -u src/sys/kern/kern_lock.c:1.160 src/sys/kern/kern_lock.c:1.161 --- src/sys/kern/kern_lock.c:1.160 Tue Nov 21 08:49:14 2017 +++ src/sys/kern/kern_lock.c Mon Dec 25 09:13:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lock.c,v 1.160 2017/11/21 08:49:14 ozaki-r Exp $ */ +/* $NetBSD: kern_lock.c,v 1.161 2017/12/25 09:13:40 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.160 2017/11/21 08:49:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.161 2017/12/25 09:13:40 ozaki-r Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -120,9 +120,9 @@ do { \ void _kernel_lock_dump(const volatile void *); lockops_t _kernel_lock_ops = { - "Kernel lock", - LOCKOPS_SPIN, - _kernel_lock_dump + .lo_name = "Kernel lock", + .lo_type = LOCKOPS_SPIN, + .lo_dump = _kernel_lock_dump, }; /* Index: src/sys/kern/kern_mutex.c diff -u src/sys/kern/kern_mutex.c:1.67 src/sys/kern/kern_mutex.c:1.68 --- src/sys/kern/kern_mutex.c:1.67 Sat Sep 16 23:55:33 2017 +++ src/sys/kern/kern_mutex.c Mon Dec 25 09:13:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex.c,v 1.67 2017/09/16 23:55:33 christos Exp $ */ +/* $NetBSD: kern_mutex.c,v 1.68 2017/12/25 09:13:40 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define __MUTEX_PRIVATE #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.67 2017/09/16 23:55:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.68 2017/12/25 09:13:40 ozaki-r Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -269,15 +269,15 @@ static void mutex_abort(const char *, si static void mutex_dump(const volatile void *); lockops_t mutex_spin_lockops = { - "Mutex", - LOCKOPS_SPIN, - mutex_dump + .lo_name = "Mutex", + .lo_type = LOCKOPS_SPIN, + .lo_dump = mutex_dump, }; lockops_t mutex_adaptive_lockops = { - "Mutex", - LOCKOPS_SLEEP, - mutex_dump + .lo_name = "Mutex", + .lo_type = LOCKOPS_SLEEP, + .lo_dump = mutex_dump, }; syncobj_t mutex_syncobj = { Index: src/sys/kern/kern_rwlock.c diff -u src/sys/kern/kern_rwlock.c:1.47 src/sys/kern/kern_rwlock.c:1.48 --- src/sys/kern/kern_rwlock.c:1.47 Sat Sep 16 23:55:33 2017 +++ src/sys/kern/kern_rwlock.c Mon Dec 25 09:13:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rwlock.c,v 1.47 2017/09/16 23:55:33 christos Exp $ */ +/* $NetBSD: kern_rwlock.c,v 1.48 2017/12/25 09:13:40 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.47 2017/09/16 23:55:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.48 2017/12/25 09:13:40 ozaki-r Exp $"); #define __RWLOCK_PRIVATE @@ -148,9 +148,9 @@ __strong_alias(rw_tryenter,rw_vector_try #endif lockops_t rwlock_lockops = { - "Reader / writer lock", - LOCKOPS_SLEEP, - rw_dump + .lo_name = "Reader / writer lock", + .lo_type = LOCKOPS_SLEEP, + .lo_dump = rw_dump, }; syncobj_t rw_syncobj = { Index: src/sys/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.75 src/sys/rump/librump/rumpkern/locks.c:1.76 --- src/sys/rump/librump/rumpkern/locks.c:1.75 Sun Sep 17 05:47:19 2017 +++ src/sys/rump/librump/rumpkern/locks.c Mon Dec 25 09:13:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.75 2017/09/17 05:47:19 kre Exp $ */ +/* $NetBSD: locks.c,v 1.76 2017/12/25 09:13:40 ozaki-r Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.75 2017/09/17 05:47:19 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.76 2017/12/25 09:13:40 ozaki-r Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -51,14 +51,14 @@ const int rump_lockdebug = 0; #include <sys/lockdebug.h> static lockops_t mutex_lockops = { - "mutex", - LOCKOPS_SLEEP, - NULL + .lo_name = "mutex", + .lo_type = LOCKOPS_SLEEP, + .lo_dump = NULL, }; static lockops_t rw_lockops = { - "rwlock", - LOCKOPS_SLEEP, - NULL + .lo_name = "rwlock", + .lo_type = LOCKOPS_SLEEP, + .lo_dump = NULL, }; #define ALLOCK(lock, ops) \