Page MenuHomeFreeBSD

D54040.id.diff
No OneTemporary

D54040.id.diff

diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -648,7 +648,8 @@
/*
* Now we can look at the time, having had a chance to verify the
- * time from the filesystem. Pretend that proc0 started now.
+ * time from the filesystem. Pretend that all current threads
+ * started now.
*/
sx_slock(&allproc_lock);
FOREACH_PROC_IN_SYSTEM(p) {
@@ -661,10 +662,13 @@
PROC_STATLOCK(p);
rufetch(p, &ru); /* Clears thread stats */
ruxreset(&p->p_rux);
- PROC_STATUNLOCK(p);
FOREACH_THREAD_IN_PROC(p, td) {
td->td_runtime = 0;
+ thread_lock(td);
+ ruxreset(&td->td_rux);
+ thread_unlock(td);
}
+ PROC_STATUNLOCK(p);
PROC_UNLOCK(p);
}
sx_sunlock(&allproc_lock);

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 7:24 PM (8 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35378251
Default Alt Text
D54040.id.diff (763 B)

Event Timeline