Page MenuHomeFreeBSD

D54040.1789699899.diff
No OneTemporary

Size
763 B
Referenced Files
None
Subscribers
None

D54040.1789699899.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
Fri, Sep 18, 2:51 AM (4 m, 58 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29727874
Default Alt Text
D54040.1789699899.diff (763 B)

Event Timeline