Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163292469
D54040.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
763 B
Referenced Files
None
Subscribers
None
D54040.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D54040: thread0: Clear td_rux stats in proc0_post
Attached
Detach File
Event Timeline
Log In to Comment