FreeBSD Bugzilla – Attachment 169969 Details for
Bug 209233
[patch] pthread_suspend_all_np races with check_suspend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Clear THR_FLAGS_SUSPENDED in resume_common()
1.patch (text/plain), 996 bytes, created by
Konstantin Belousov
on 2016-05-04 15:19:44 UTC
(
hide
)
Description:
Clear THR_FLAGS_SUSPENDED in resume_common()
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2016-05-04 15:19:44 UTC
Size:
996 bytes
patch
obsolete
>diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c >index d11e328..b280cb1 100644 >--- a/lib/libthr/thread/thr_resume_np.c >+++ b/lib/libthr/thread/thr_resume_np.c >@@ -91,7 +91,7 @@ static void > resume_common(struct pthread *thread) > { > /* Clear the suspend flag: */ >- thread->flags &= ~THR_FLAGS_NEED_SUSPEND; >+ thread->flags &= ~(THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED); > thread->cycle++; > _thr_umtx_wake(&thread->cycle, 1, 0); > } >diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c >index ce7e70b..a965743 100644 >--- a/lib/libthr/thread/thr_sig.c >+++ b/lib/libthr/thread/thr_sig.c >@@ -392,7 +392,6 @@ check_suspend(struct pthread *curthread) > THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock); > _thr_umtx_wait_uint(&curthread->cycle, cycle, NULL, 0); > THR_UMUTEX_LOCK(curthread, &(curthread)->lock); >- curthread->flags &= ~THR_FLAGS_SUSPENDED; > } > THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock); > curthread->critical_count--;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209233
:
169926
|
169969
|
169971
|
169973