summaryrefslogtreecommitdiff
path: root/sys/kern/kern_kse.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-07-16 21:04:55 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-07-16 21:04:55 +0000
commit52eb84641d66296d0a536e69a91c9923137a4502 (patch)
tree40f1025728659f06a876858c57f12a51848d214c /sys/kern/kern_kse.c
parentd3373e371b171cac7ac8cbcfa56c2d80af6dd8b7 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r--sys/kern/kern_kse.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index 7fa8ac7b94fd..29d83d319fc3 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -838,8 +838,9 @@ thread_statclock(int user)
return (0);
if (user) {
/* Current always do via ast() */
+ td->td_pflags |= TDP_USTATCLOCK;
mtx_lock_spin(&sched_lock);
- td->td_flags |= (TDF_USTATCLOCK|TDF_ASTPENDING);
+ td->td_flags |= TDF_ASTPENDING;
mtx_unlock_spin(&sched_lock);
td->td_uuticks++;
} else if (td->td_mailbox != NULL)
@@ -1129,11 +1130,9 @@ thread_userret(struct thread *td, struct trapframe *frame)
* is returning from interrupt, charge thread's
* userland time for UTS.
*/
- if (td->td_flags & TDF_USTATCLOCK) {
+ if (td->td_pflags & TDP_USTATCLOCK) {
thread_update_usr_ticks(td, 1);
- mtx_lock_spin(&sched_lock);
- td->td_flags &= ~TDF_USTATCLOCK;
- mtx_unlock_spin(&sched_lock);
+ td->td_pflags &= ~TDP_USTATCLOCK;
}
/*