Module Name: src
Committed By: pooka
Date: Sat Apr 18 16:33:37 UTC 2009
Modified Files:
src/sys/rump/librump/rumpvfs: rump_vfs.c
Log Message:
If running in multithreaded mode, create sched_sync thread.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/rump/librump/rumpvfs/rump_vfs.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/rumpvfs/rump_vfs.c
diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.14 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.15
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.14 Wed Mar 18 10:22:45 2009
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c Sat Apr 18 16:33:37 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.14 2009/03/18 10:22:45 cegger Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.15 2009/04/18 16:33:37 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -36,6 +36,7 @@
#include <sys/conf.h>
#include <sys/filedesc.h>
#include <sys/lockf.h>
+#include <sys/kthread.h>
#include <sys/module.h>
#include <sys/namei.h>
#include <sys/queue.h>
@@ -44,6 +45,7 @@
#include <sys/wapbl.h>
#include <miscfs/specfs/specdev.h>
+#include <miscfs/syncfs/syncfs.h>
#include <rump/rump.h>
#include <rump/rumpuser.h>
@@ -109,6 +111,14 @@
rump_cwdi.cwdi_cdir = rootvnode;
vref(rump_cwdi.cwdi_cdir);
proc0.p_cwdi = &rump_cwdi;
+
+ if (rump_threads) {
+ int rv;
+
+ if ((rv = kthread_create(PRI_IOFLUSH, KTHREAD_MPSAFE, NULL,
+ sched_sync, NULL, NULL, "ioflush")) != 0)
+ panic("syncer thread create failed: %d", rv);
+ }
}
struct mount *