summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-24 10:28:19 +0000
committerjhb <jhb@FreeBSD.org>2001-01-24 10:28:19 +0000
commit9c54776639e8d3717d75c0e18e2ff853693b58c5 (patch)
treefdc5ff91a698d1447d9deba36c92ece3524faa7b /sys/dev/vinum
parentfb77bd069b720138cf85e22975c4f190ccb548d2 (diff)
downloadFreeBSD-src-9c54776639e8d3717d75c0e18e2ff853693b58c5.zip
FreeBSD-src-9c54776639e8d3717d75c0e18e2ff853693b58c5.tar.gz
- Proc locking around the vinumdaemon dinking with its flags.
- P_INMEM -> PS_INMEM.
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumdaemon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumdaemon.c b/sys/dev/vinum/vinumdaemon.c
index 9a04a44..99c1751 100644
--- a/sys/dev/vinum/vinumdaemon.c
+++ b/sys/dev/vinum/vinumdaemon.c
@@ -69,7 +69,12 @@ vinum_daemon(void)
int s;
struct daemonq *request;
- curproc->p_flag |= P_INMEM | P_SYSTEM; /* we're a system process */
+ PROC_LOCK(curproc);
+ curproc->p_flag |= P_SYSTEM; /* we're a system process */
+ PROC_UNLOCK(curproc);
+ mtx_enter(&sched_lock, MTX_SPIN);
+ curproc->p_sflag |= PS_INMEM;
+ mtx_exit(&sched_lock, MTX_SPIN);
daemon_save_config(); /* start by saving the configuration */
daemonpid = curproc->p_pid; /* mark our territory */
while (1) {
OpenPOWER on IntegriCloud