diff options
author | kib <kib@FreeBSD.org> | 2009-10-27 10:42:24 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-10-27 10:42:24 +0000 |
commit | eb4c68098b66d84de3abc7be00acfdc6d2f8f980 (patch) | |
tree | 5f94dc1615964e0cca1ac079c4b76e9157688e6a /sys/arm | |
parent | feb999713be0c5c7cf9239074dd5d49d5dff1fa0 (diff) | |
download | FreeBSD-src-eb4c68098b66d84de3abc7be00acfdc6d2f8f980.zip FreeBSD-src-eb4c68098b66d84de3abc7be00acfdc6d2f8f980.tar.gz |
In kern_sigsuspend(), better manipulate thread signal mask using
kern_sigprocmask() to properly notify other possible candidate threads
for signal delivery.
Since sigsuspend() shall only return to usermode after a signal was
delivered, do cursig/postsig loop immediately after waiting for
signal, repeating the wait if wakeup was spurious due to race with
other thread fetching signal from the process queue before us. Add
thread_suspend_check() call to allow the thread to be stopped or killed
while in loop.
Modify last argument of kern_sigprocmask() from boolean to flags,
allowing the function to be called with locked proc. Convertion of the
callers that supplied 1 to the old argument will be done in the next
commit, and due to SIGPROCMASK_OLD value equial to 1, code is formally
correct in between.
Reviewed by: davidxu
Tested by: pho
MFC after: 1 month
Diffstat (limited to 'sys/arm')
0 files changed, 0 insertions, 0 deletions