Apply C99-style struct initialization to syncobj_t
This commit is contained in:
parent
81afadce96
commit
8812081aa6
@ -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_one(kcondvar_t *);
|
||||
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 = {
|
||||
|
@ -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 @@ lockops_t mutex_adaptive_lockops = {
|
||||
};
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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 @@ lockops_t rwlock_lockops = {
|
||||
};
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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 sched_lendpri(struct lwp *, pri_t);
|
||||
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. */
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.62 2017/12/08 01:19:29 christos Exp $"
|
||||
#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;
|
||||
|
@ -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 const int sel_flag[] = {
|
||||
};
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user