Module Name: src Committed By: pooka Date: Sun Jul 11 11:37:24 UTC 2010
Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: fd_hold() when creating new threads. This makes the fd code use multithreaded mode and actually work with a multithreaded process. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/sys/rump/librump/rumpkern/rump.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/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.179 src/sys/rump/librump/rumpkern/rump.c:1.180 --- src/sys/rump/librump/rumpkern/rump.c:1.179 Sat Jun 12 07:13:54 2010 +++ src/sys/rump/librump/rumpkern/rump.c Sun Jul 11 11:37:24 2010 @@ -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;