Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJ...
details: https://anonhg.NetBSD.org/src/rev/d87e7161dbee
branches: trunk
changeset: 768067:d87e7161dbee
user: rmind <rmind%NetBSD.org@localhost>
date: Sun Aug 07 14:03:15 2011 +0000
description:
Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
diffstat:
share/man/man9/kthread.9 | 14 +++++++-------
sys/dev/flash/flash_io.c | 6 +++---
sys/dev/fss.c | 6 +++---
sys/kern/kern_kthread.c | 10 +++++-----
sys/rump/librump/rumpkern/threads.c | 8 ++++----
sys/rump/net/lib/libshmif/if_shmem.c | 6 +++---
sys/rump/net/lib/libvirtif/if_virt.c | 8 ++++----
sys/sys/kthread.h | 4 ++--
sys/sys/lwp.h | 4 ++--
tests/rump/kernspace/busypage.c | 6 +++---
tests/rump/kernspace/thread.c | 6 +++---
tests/rump/kernspace/tsleep.c | 8 ++++----
12 files changed, 43 insertions(+), 43 deletions(-)
diffs (truncated from 370 to 300 lines):
diff -r 71d5646bd26d -r d87e7161dbee share/man/man9/kthread.9
--- a/share/man/man9/kthread.9 Sun Aug 07 14:00:08 2011 +0000
+++ b/share/man/man9/kthread.9 Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: kthread.9,v 1.26 2011/05/19 08:55:01 wiz Exp $
+.\" $NetBSD: kthread.9,v 1.27 2011/08/07 14:03:16 rmind Exp $
.\"
.\" Copyright (c) 2000, 2007, 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd May 19, 2011
+.Dd August 7, 2011
.Dt KTHREAD 9
.Os
.Sh NAME
@@ -93,7 +93,7 @@
May be
.Dv NULL ,
unless
-.Dv KTHREAD_JOINABLE
+.Dv KTHREAD_MUSTJOIN
is specified in
.Fa flags .
.It Fa fmt
@@ -106,7 +106,7 @@
The following
.Va flags
are defined.
-.Bl -tag -width KTHREAD_JOINABLE
+.Bl -tag -width KTHREAD_MUSTJOIN
.It Dv KTHREAD_IDLE
Causes the thread to be created in the
.Dv LSIDL
@@ -138,8 +138,8 @@
.Dv SCHED_RR
class do not have their priority dynamically
adjusted by the scheduler.
-.It Dv KTHREAD_JOINABLE
-Requests creation of joinable kthread.
+.It Dv KTHREAD_MUSTJOIN
+Indicates that created kthread must be joined.
In such case
.Fn kthread_exit
will wait until
@@ -160,7 +160,7 @@
.Xr pthread_join 3 ,
however it must be called only once for kernel thread which was
created using the
-.Dv KTHREAD_JOIN
+.Dv KTHREAD_MUSTJOIN
flag and would wait on
.Fa kthread_exit .
.El
diff -r 71d5646bd26d -r d87e7161dbee sys/dev/flash/flash_io.c
--- a/sys/dev/flash/flash_io.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/dev/flash/flash_io.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_io.c,v 1.3 2011/07/15 19:19:57 cliff Exp $ */
+/* $NetBSD: flash_io.c,v 1.4 2011/08/07 14:03:16 rmind Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash_io.c,v 1.3 2011/07/15 19:19:57 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_io.c,v 1.4 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -119,7 +119,7 @@
fio->fio_write_pending = false;
/* arrange to allocate the kthread */
- error = kthread_create(PRI_NONE, KTHREAD_JOINABLE | KTHREAD_MPSAFE,
+ error = kthread_create(PRI_NONE, KTHREAD_MUSTJOIN | KTHREAD_MPSAFE,
NULL, flash_sync_thread, fio, &fio->fio_thread, "flashio");
if (!error)
diff -r 71d5646bd26d -r d87e7161dbee sys/dev/fss.c
--- a/sys/dev/fss.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/dev/fss.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.77 2011/06/21 13:59:41 hannken Exp $ */
+/* $NetBSD: fss.c,v 1.78 2011/08/07 14:03:16 rmind Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.77 2011/06/21 13:59:41 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.78 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -455,7 +455,7 @@
}
sc->sc_flags |= FSS_BS_THREAD;
- if ((error = kthread_create(PRI_BIO, KTHREAD_JOINABLE, NULL,
+ if ((error = kthread_create(PRI_BIO, KTHREAD_MUSTJOIN, NULL,
fss_bs_thread, sc, &sc->sc_bs_lwp,
"%s", device_xname(sc->sc_dev))) != 0) {
sc->sc_flags &= ~FSS_BS_THREAD;
diff -r 71d5646bd26d -r d87e7161dbee sys/kern/kern_kthread.c
--- a/sys/kern/kern_kthread.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/kern/kern_kthread.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_kthread.c,v 1.35 2011/07/17 20:54:52 joerg Exp $ */
+/* $NetBSD: kern_kthread.c,v 1.36 2011/08/07 14:03:16 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.35 2011/07/17 20:54:52 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.36 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -121,9 +121,9 @@
l->l_cpu = ci;
}
- if ((flag & KTHREAD_JOINABLE) != 0) {
+ if ((flag & KTHREAD_MUSTJOIN) != 0) {
KASSERT(lp != NULL);
- l->l_pflag |= LP_JOINABLE;
+ l->l_pflag |= LP_MUSTJOIN;
}
if ((flag & KTHREAD_INTR) != 0) {
l->l_pflag |= LP_INTR;
@@ -170,7 +170,7 @@
}
/* Barrier for joining. */
- if (l->l_pflag & LP_JOINABLE) {
+ if (l->l_pflag & LP_MUSTJOIN) {
mutex_enter(&kthread_lock);
while (kthread_jtarget != l) {
cv_wait(&kthread_cv, &kthread_lock);
diff -r 71d5646bd26d -r d87e7161dbee sys/rump/librump/rumpkern/threads.c
--- a/sys/rump/librump/rumpkern/threads.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/rump/librump/rumpkern/threads.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: threads.c,v 1.14 2011/07/17 20:54:54 joerg Exp $ */
+/* $NetBSD: threads.c,v 1.15 2011/08/07 14:03:16 rmind Exp $ */
/*
* Copyright (c) 2007-2009 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.14 2011/07/17 20:54:54 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.15 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -153,14 +153,14 @@
}
rv = rumpuser_thread_create(threadbouncer, k, thrname,
- (flags & KTHREAD_JOINABLE) == KTHREAD_JOINABLE, &l->l_ctxlink);
+ (flags & KTHREAD_MUSTJOIN) == KTHREAD_MUSTJOIN, &l->l_ctxlink);
if (rv)
return rv;
if (newlp) {
*newlp = l;
} else {
- KASSERT((flags & KTHREAD_JOINABLE) == 0);
+ KASSERT((flags & KTHREAD_MUSTJOIN) == 0);
}
return 0;
diff -r 71d5646bd26d -r d87e7161dbee sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.39 2011/03/21 16:41:09 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.40 2011/08/07 14:03:16 rmind Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.39 2011/03/21 16:41:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.40 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -186,7 +186,7 @@
error = 0;
if (rump_threads) {
error = kthread_create(PRI_NONE,
- KTHREAD_MPSAFE | KTHREAD_JOINABLE, NULL,
+ KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL,
shmif_rcv, ifp, &sc->sc_rcvl, "shmif");
} else {
printf("WARNING: threads not enabled, shmif NOT working\n");
diff -r 71d5646bd26d -r d87e7161dbee sys/rump/net/lib/libvirtif/if_virt.c
--- a/sys/rump/net/lib/libvirtif/if_virt.c Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/rump/net/lib/libvirtif/if_virt.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_virt.c,v 1.23 2011/06/22 04:01:08 mrg Exp $ */
+/* $NetBSD: if_virt.c,v 1.24 2011/08/07 14:03:16 rmind Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.23 2011/06/22 04:01:08 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.24 2011/08/07 14:03:16 rmind Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -116,12 +116,12 @@
ifp->if_softc = sc;
if (rump_threads) {
- if ((error = kthread_create(PRI_NONE, KTHREAD_JOINABLE, NULL,
+ if ((error = kthread_create(PRI_NONE, KTHREAD_MUSTJOIN, NULL,
virtif_receiver, ifp, &sc->sc_l_rcv, "virtifr")) != 0)
goto out;
if ((error = kthread_create(PRI_NONE,
- KTHREAD_JOINABLE | KTHREAD_MPSAFE, NULL,
+ KTHREAD_MUSTJOIN | KTHREAD_MPSAFE, NULL,
virtif_sender, ifp, &sc->sc_l_snd, "virtifs")) != 0)
goto out;
} else {
diff -r 71d5646bd26d -r d87e7161dbee sys/sys/kthread.h
--- a/sys/sys/kthread.h Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/sys/kthread.h Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kthread.h,v 1.10 2011/05/19 03:07:29 rmind Exp $ */
+/* $NetBSD: kthread.h,v 1.11 2011/08/07 14:03:16 rmind Exp $ */
/*-
* Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
#define KTHREAD_MPSAFE 0x02 /* Do not acquire kernel_lock */
#define KTHREAD_INTR 0x04 /* Software interrupt handler */
#define KTHREAD_TS 0x08 /* Time-sharing priority range */
-#define KTHREAD_JOINABLE 0x10 /* Joinable */
+#define KTHREAD_MUSTJOIN 0x10 /* Must join on exit */
void kthread_sysinit(void);
diff -r 71d5646bd26d -r d87e7161dbee sys/sys/lwp.h
--- a/sys/sys/lwp.h Sun Aug 07 14:00:08 2011 +0000
+++ b/sys/sys/lwp.h Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.153 2011/08/07 13:33:02 rmind Exp $ */
+/* $NetBSD: lwp.h,v 1.154 2011/08/07 14:03:16 rmind Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -248,7 +248,7 @@
#define LP_MPSAFE 0x00000020 /* Starts life without kernel_lock */
#define LP_INTR 0x00000040 /* Soft interrupt handler */
#define LP_SYSCTLWRITE 0x00000080 /* sysctl write lock held */
-#define LP_JOINABLE 0x00000100 /* Joinable kthread */
+#define LP_MUSTJOIN 0x00000100 /* Must join kthread on exit */
#define LP_SA_PAGEFAULT 0x00000200 /* SA LWP in pagefault handler */
#define LP_SA_NOBLOCK 0x00000400 /* SA don't upcall on block */
#define LP_TIMEINTR 0x00010000 /* Time this soft interrupt */
diff -r 71d5646bd26d -r d87e7161dbee tests/rump/kernspace/busypage.c
--- a/tests/rump/kernspace/busypage.c Sun Aug 07 14:00:08 2011 +0000
+++ b/tests/rump/kernspace/busypage.c Sun Aug 07 14:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: busypage.c,v 1.4 2011/06/12 06:38:14 mrg Exp $ */
+/* $NetBSD: busypage.c,v 1.5 2011/08/07 14:03:15 rmind Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: busypage.c,v 1.4 2011/06/12 06:38:14 mrg Exp $");
+__RCSID("$NetBSD: busypage.c,v 1.5 2011/08/07 14:03:15 rmind Exp $");
#endif /* !lint */
#include <sys/param.h>
@@ -75,7 +75,7 @@
if (testpg == NULL)
Home |
Main Index |
Thread Index |
Old Index