diff options
author | attilio <attilio@FreeBSD.org> | 2010-01-08 14:55:11 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-01-08 14:55:11 +0000 |
commit | 7fdd56a8c5bb429846ceac14b5183813110727e4 (patch) | |
tree | b884c339b2f94e639c451c6f6b96376f418bc7cc /sys/kern | |
parent | 8c2627a1d083938b9a0152bef40ddd04c3a74234 (diff) | |
download | FreeBSD-src-7fdd56a8c5bb429846ceac14b5183813110727e4.zip FreeBSD-src-7fdd56a8c5bb429846ceac14b5183813110727e4.tar.gz |
- Fix a bug in sched_4bsd where the timestamp for the sleeping operation
is not cleaned up on the wakeup but reset.
This is harmless mostly because td_slptick (and ki_slptime from
userland) should be analyzed only with the assumption that the thread
is actually sleeping (thus while the td_slptick is correctly set) but
without this invariant the number is nomore consistent.
- Move td_slptick from u_int to int in order to follow 'ticks' signedness
and wrap up accordingly [0]
[0] Submitted by: emaste
Sponsored by: Sandvine Incorporated
MFC 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sched_4bsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index c0019a9..99ea7b8 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1050,7 +1050,7 @@ sched_wakeup(struct thread *td) updatepri(td); resetpriority(td); } - td->td_slptick = ticks; + td->td_slptick = 0; ts->ts_slptime = 0; sched_add(td, SRQ_BORING); } |