summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-02-07 20:58:47 +0000
committerjulian <julian@FreeBSD.org>2002-02-07 20:58:47 +0000
commitb5eb64d6f0fccb72419da5552deee22cb6117fac (patch)
treeb267ad497d8d81c2c79c107443dabe850da2126b /sys/kern/vfs_subr.c
parentfce570367d0faf3002916a499e684172e61d8b9b (diff)
downloadFreeBSD-src-b5eb64d6f0fccb72419da5552deee22cb6117fac.zip
FreeBSD-src-b5eb64d6f0fccb72419da5552deee22cb6117fac.tar.gz
Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 3c61b17..a37133d 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -602,7 +602,7 @@ vnlru_proc(void)
int s;
int done;
struct proc *p = vnlruproc;
- struct thread *td = &p->p_thread; /* XXXKSE */
+ struct thread *td = FIRST_THREAD_IN_PROC(p); /* XXXKSE */
mtx_lock(&Giant);
@@ -1217,7 +1217,7 @@ sched_sync(void)
struct mount *mp;
long starttime;
int s;
- struct thread *td = &updateproc->p_thread; /* XXXKSE */
+ struct thread *td = FIRST_THREAD_IN_PROC(updateproc); /* XXXKSE */
mtx_lock(&Giant);
@@ -1315,8 +1315,8 @@ speedup_syncer()
{
mtx_lock_spin(&sched_lock);
- if (updateproc->p_thread.td_wchan == &lbolt) /* XXXKSE */
- setrunnable(&updateproc->p_thread);
+ if (FIRST_THREAD_IN_PROC(updateproc)->td_wchan == &lbolt) /* XXXKSE */
+ setrunnable(FIRST_THREAD_IN_PROC(updateproc));
mtx_unlock_spin(&sched_lock);
if (rushjob < syncdelay / 2) {
rushjob += 1;
@@ -2560,7 +2560,8 @@ vfs_unmountall()
if (curthread != NULL)
td = curthread;
else
- td = &initproc->p_thread; /* XXX XXX should this be proc0? */
+/* XXX XXX should this be proc0? */
+ td = FIRST_THREAD_IN_PROC(initproc);
/*
* Since this only runs when rebooting, it is not interlocked.
*/
OpenPOWER on IntegriCloud