mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Read cycle count before sending signal, this fixes a userland thread
suspension bug. MFC after: 3 days
This commit is contained in:
parent
0a0a390d7f
commit
bab012a948
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155857
|
@ -126,10 +126,10 @@ suspend_common(struct pthread *curthread, struct pthread *thread,
|
|||
while (thread->state != PS_DEAD &&
|
||||
!(thread->flags & THR_FLAGS_SUSPENDED)) {
|
||||
thread->flags |= THR_FLAGS_NEED_SUSPEND;
|
||||
tmp = thread->cycle;
|
||||
THR_THREAD_UNLOCK(curthread, thread);
|
||||
_thr_send_sig(thread, SIGCANCEL);
|
||||
if (waitok) {
|
||||
tmp = thread->cycle;
|
||||
_thr_umtx_wait(&thread->cycle, tmp, NULL);
|
||||
THR_THREAD_LOCK(curthread, thread);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue