Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141105794
D53211.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
D53211.id.diff
View Options
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -528,6 +528,24 @@
* single threading requirement or some other STOP condition.
*/
PROC_LOCK(p);
+ if ((p->p_flag & (P_STOPPED_SINGLE | P_TOTAL_STOP)) ==
+ (P_STOPPED_SINGLE | P_TOTAL_STOP) &&
+ p->p_suspcount + 1 == p->p_numthreads) {
+ /*
+ * If we are single-threaded by an remote process,
+ * there might be nobody making the remote process
+ * runable after it switches off cpu in
+ * thread_single(). If the thread requested the
+ * single-threading is off cpu, poke it to make
+ * another round in thread_single().
+ */
+ thread_lock(p->p_singlethread);
+ if (p->p_singlethread->td_proc != p &&
+ TD_GET_STATE(p->p_singlethread) == TDS_CAN_RUN)
+ setrunnable(p->p_singlethread, 0);
+ else
+ thread_unlock(p->p_singlethread);
+ }
thread_suspend_check(0);
PROC_UNLOCK(p);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 1, 10:44 PM (10 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24007839
Default Alt Text
D53211.id.diff (950 B)
Attached To
Mode
D53211: thread_single(P_TOTAL_STOP): set single-threading thread runnable
Attached
Detach File
Event Timeline
Log In to Comment