From 0cb3276d57e68364c5cd8f83dd504672a5e5f5b0 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 16 Jul 2004 21:04:55 +0000 Subject: - Move TDF_OWEPREEMPT, TDF_OWEUPC, and TDF_USTATCLOCK over to td_pflags since they are only accessed by curthread and thus do not need any locking. - Move pr_addr and pr_ticks out of struct uprof (which is per-process) and directly into struct thread as td_profil_addr and td_profil_ticks as these variables are really per-thread. (They are used to defer an addupc_intr() that was too "hard" until ast()). --- sys/kern/sched_4bsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/kern/sched_4bsd.c') diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 2a51bc0..c80214e 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -654,7 +654,8 @@ sched_switch(struct thread *td, struct thread *newtd) sched_tdcnt++; td->td_lastcpu = td->td_oncpu; td->td_last_kse = ke; - td->td_flags &= ~(TDF_NEEDRESCHED | TDF_OWEPREEMPT); + td->td_flags &= ~TDF_NEEDRESCHED; + td->td_pflags &= ~TDP_OWEPREEMPT; td->td_oncpu = NOCPU; /* * At the last moment, if this thread is still marked RUNNING, -- cgit v1.1