[Bug 209233] [patch] pthread_suspend_all_np races with check_suspend
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed May 4 10:52:04 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209233
Konstantin Belousov <kib at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kib at FreeBSD.org
--- Comment #1 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Lawrence Esswood from comment #0)
So the issue is that we might leave pthread_resume{_all}_np with the
THR_FLAG_SUSPENDED still set. IMO this is the real bug, and it cannot be
worked around by trying to set NEED_SUSPEND in the next suspend cycle.
Instead, resume functions should wait until the resumed thread is scheduled and
has a chance to run enough to clear the flag.
One more wait/wake point around thread->cycle would be needed to ensure of
proper control pass between resume->resumed->resume threads.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-threads
mailing list