git: e32308efa215 - main - thr_sig.c: style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 28 Dec 2024 17:20:22 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e32308efa215868d98036c30f73c98ebf67e03d4 commit e32308efa215868d98036c30f73c98ebf67e03d4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-12-22 20:35:26 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-12-28 17:01:27 +0000 thr_sig.c: style Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48200 --- lib/libthr/thread/thr_sig.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index b953c430158c..e69641d8e1b5 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -185,8 +185,7 @@ thr_remove_thr_signals(const sigset_t *set, sigset_t *newset) } static void -sigcancel_handler(int sig __unused, - siginfo_t *info __unused, ucontext_t *ucp) +sigcancel_handler(int sig __unused, siginfo_t *info __unused, ucontext_t *ucp) { struct pthread *curthread = _get_curthread(); int err; @@ -354,7 +353,7 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp) * on getting a signal before it agrees to return. */ if (curthread->cancel_point) { - if (curthread->in_sigsuspend && ucp) { + if (curthread->in_sigsuspend && ucp != NULL) { SIGADDSET(ucp->uc_sigmask, SIGCANCEL); curthread->unblock_sigcancel = 1; _thr_send_sig(curthread, SIGCANCEL); @@ -365,8 +364,8 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp) * asynchronous cancellation mode, act upon * immediately. */ - _pthread_exit_mask(PTHREAD_CANCELED, - ucp? &ucp->uc_sigmask : NULL); + _pthread_exit_mask(PTHREAD_CANCELED, ucp != NULL ? + &ucp->uc_sigmask : NULL); } } @@ -405,9 +404,8 @@ check_suspend(struct pthread *curthread) { uint32_t cycle; - if (__predict_true((curthread->flags & - (THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED)) - != THR_FLAGS_NEED_SUSPEND)) + if (__predict_true((curthread->flags & (THR_FLAGS_NEED_SUSPEND | + THR_FLAGS_SUSPENDED)) != THR_FLAGS_NEED_SUSPEND)) return; if (curthread == _single_thread) return; @@ -664,7 +662,7 @@ _thr_sigmask(int how, const sigset_t *set, sigset_t *oset) } int -_sigsuspend(const sigset_t * set) +_sigsuspend(const sigset_t *set) { sigset_t newset; @@ -672,7 +670,7 @@ _sigsuspend(const sigset_t * set) } int -__thr_sigsuspend(const sigset_t * set) +__thr_sigsuspend(const sigset_t *set) { struct pthread *curthread; sigset_t newset; @@ -698,7 +696,7 @@ __thr_sigsuspend(const sigset_t * set) int _sigtimedwait(const sigset_t *set, siginfo_t *info, - const struct timespec * timeout) + const struct timespec *timeout) { sigset_t newset; @@ -713,7 +711,7 @@ _sigtimedwait(const sigset_t *set, siginfo_t *info, */ int __thr_sigtimedwait(const sigset_t *set, siginfo_t *info, - const struct timespec * timeout) + const struct timespec *timeout) { struct pthread *curthread = _get_curthread(); sigset_t newset;