Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Apply C99-style struct initialization to syncobj_t
details: https://anonhg.NetBSD.org/src/rev/90d3b594b7bc
branches: trunk
changeset: 359113:90d3b594b7bc
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Jan 30 07:52:22 2018 +0000
description:
Apply C99-style struct initialization to syncobj_t
diffstat:
sys/kern/kern_condvar.c | 14 +++++++-------
sys/kern/kern_mutex.c | 14 +++++++-------
sys/kern/kern_rwlock.c | 14 +++++++-------
sys/kern/kern_synch.c | 24 ++++++++++++------------
sys/kern/sys_lwp.c | 14 +++++++-------
sys/kern/sys_select.c | 14 +++++++-------
6 files changed, 47 insertions(+), 47 deletions(-)
diffs (223 lines):
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/kern_condvar.c
--- a/sys/kern/kern_condvar.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/kern_condvar.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_condvar.c,v 1.40 2017/12/25 09:13:40 ozaki-r Exp $ */
+/* $NetBSD: kern_condvar.c,v 1.41 2018/01/30 07:52:22 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.40 2017/12/25 09:13:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.41 2018/01/30 07:52:22 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,11 +71,11 @@
static inline void cv_wakeup_all(kcondvar_t *);
static syncobj_t cv_syncobj = {
- SOBJ_SLEEPQ_SORTED,
- cv_unsleep,
- sleepq_changepri,
- sleepq_lendpri,
- syncobj_noowner,
+ .sobj_flag = SOBJ_SLEEPQ_SORTED,
+ .sobj_unsleep = cv_unsleep,
+ .sobj_changepri = sleepq_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = syncobj_noowner,
};
lockops_t cv_lockops = {
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/kern_mutex.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_mutex.c,v 1.69 2018/01/18 08:40:56 skrll Exp $ */
+/* $NetBSD: kern_mutex.c,v 1.70 2018/01/30 07:52:22 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.69 2018/01/18 08:40:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.70 2018/01/30 07:52:22 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -281,11 +281,11 @@
};
syncobj_t mutex_syncobj = {
- SOBJ_SLEEPQ_SORTED,
- turnstile_unsleep,
- turnstile_changepri,
- sleepq_lendpri,
- (void *)mutex_owner,
+ .sobj_flag = SOBJ_SLEEPQ_SORTED,
+ .sobj_unsleep = turnstile_unsleep,
+ .sobj_changepri = turnstile_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = (void *)mutex_owner,
};
/*
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/kern_rwlock.c
--- a/sys/kern/kern_rwlock.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/kern_rwlock.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rwlock.c,v 1.48 2017/12/25 09:13:40 ozaki-r Exp $ */
+/* $NetBSD: kern_rwlock.c,v 1.49 2018/01/30 07:52:22 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.48 2017/12/25 09:13:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.49 2018/01/30 07:52:22 ozaki-r Exp $");
#define __RWLOCK_PRIVATE
@@ -154,11 +154,11 @@
};
syncobj_t rw_syncobj = {
- SOBJ_SLEEPQ_SORTED,
- turnstile_unsleep,
- turnstile_changepri,
- sleepq_lendpri,
- rw_owner,
+ .sobj_flag = SOBJ_SLEEPQ_SORTED,
+ .sobj_unsleep = turnstile_unsleep,
+ .sobj_changepri = turnstile_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = rw_owner,
};
/*
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/kern_synch.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_synch.c,v 1.312 2017/08/06 09:14:14 christos Exp $ */
+/* $NetBSD: kern_synch.c,v 1.313 2018/01/30 07:52:22 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.312 2017/08/06 09:14:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.313 2018/01/30 07:52:22 ozaki-r Exp $");
#include "opt_kstack.h"
#include "opt_perfctrs.h"
@@ -111,19 +111,19 @@
static void resched_cpu(struct lwp *);
syncobj_t sleep_syncobj = {
- SOBJ_SLEEPQ_SORTED,
- sleepq_unsleep,
- sleepq_changepri,
- sleepq_lendpri,
- syncobj_noowner,
+ .sobj_flag = SOBJ_SLEEPQ_SORTED,
+ .sobj_unsleep = sleepq_unsleep,
+ .sobj_changepri = sleepq_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = syncobj_noowner,
};
syncobj_t sched_syncobj = {
- SOBJ_SLEEPQ_SORTED,
- sched_unsleep,
- sched_changepri,
- sched_lendpri,
- syncobj_noowner,
+ .sobj_flag = SOBJ_SLEEPQ_SORTED,
+ .sobj_unsleep = sched_unsleep,
+ .sobj_changepri = sched_changepri,
+ .sobj_lendpri = sched_lendpri,
+ .sobj_owner = syncobj_noowner,
};
/* "Lightning bolt": once a second sleep address. */
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/sys_lwp.c
--- a/sys/kern/sys_lwp.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/sys_lwp.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_lwp.c,v 1.62 2017/12/08 01:19:29 christos Exp $ */
+/* $NetBSD: sys_lwp.c,v 1.63 2018/01/30 07:52:23 ozaki-r Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.62 2017/12/08 01:19:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.63 2018/01/30 07:52:23 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -54,11 +54,11 @@
#define LWP_UNPARK_MAX 1024
static syncobj_t lwp_park_sobj = {
- SOBJ_SLEEPQ_LIFO,
- sleepq_unsleep,
- sleepq_changepri,
- sleepq_lendpri,
- syncobj_noowner,
+ .sobj_flag = SOBJ_SLEEPQ_LIFO,
+ .sobj_unsleep = sleepq_unsleep,
+ .sobj_changepri = sleepq_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = syncobj_noowner,
};
static sleeptab_t lwp_park_tab;
diff -r c65cba6432fb -r 90d3b594b7bc sys/kern/sys_select.c
--- a/sys/kern/sys_select.c Mon Jan 29 19:51:15 2018 +0000
+++ b/sys/kern/sys_select.c Tue Jan 30 07:52:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_select.c,v 1.40 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: sys_select.c,v 1.41 2018/01/30 07:52:23 ozaki-r Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.40 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.41 2018/01/30 07:52:23 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -140,11 +140,11 @@
};
static syncobj_t select_sobj = {
- SOBJ_SLEEPQ_FIFO,
- sleepq_unsleep,
- sleepq_changepri,
- sleepq_lendpri,
- syncobj_noowner,
+ .sobj_flag = SOBJ_SLEEPQ_FIFO,
+ .sobj_unsleep = sleepq_unsleep,
+ .sobj_changepri = sleepq_changepri,
+ .sobj_lendpri = sleepq_lendpri,
+ .sobj_owner = syncobj_noowner,
};
static selcluster_t *selcluster[SELCLUSTERS] __read_mostly;
Home |
Main Index |
Thread Index |
Old Index