Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern fd_hold() when creating new thread...
details: https://anonhg.NetBSD.org/src/rev/fa27ac15a8ab
branches: trunk
changeset: 756303:fa27ac15a8ab
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Jul 11 11:37:24 2010 +0000
description:
fd_hold() when creating new threads. This makes the fd code use
multithreaded mode and actually work with a multithreaded process.
diffstat:
sys/rump/librump/rumpkern/rump.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r fd79e92ecbff -r fa27ac15a8ab sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Sun Jul 11 11:33:47 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Sun Jul 11 11:37:24 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.179 2010/06/12 07:13:54 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.180 2010/07/11 11:37:24 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.179 2010/06/12 07:13:54 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.180 2010/07/11 11:37:24 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -538,6 +538,8 @@
l->l_proc = p;
l->l_lid = lid;
l->l_fd = p->p_fd;
+ if (pid == 0)
+ fd_hold(l);
l->l_cpu = NULL;
l->l_target_cpu = rump_cpu;
lwp_initspecific(l);
@@ -578,6 +580,8 @@
kmem_free(p, sizeof(*p));
atomic_dec_uint(&nprocs);
+ } else {
+ fd_free();
}
KASSERT((l->l_flag & LW_WEXIT) == 0);
l->l_flag |= LW_WEXIT;
Home |
Main Index |
Thread Index |
Old Index