mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
inline testcancel() into thr_cancel_leave(), because cancel_pending is
almost false, this makes a slight better branch predicting.
This commit is contained in:
parent
04ebad3842
commit
e5c66a0d9e
1 changed files with 3 additions and 2 deletions
|
|
@ -158,6 +158,7 @@ void
|
|||
_thr_cancel_leave(struct pthread *curthread, int maycancel)
|
||||
{
|
||||
curthread->cancel_point = 0;
|
||||
if (maycancel)
|
||||
testcancel(curthread);
|
||||
if (__predict_false(SHOULD_CANCEL(curthread) &&
|
||||
!THR_IN_CRITICAL(curthread) && maycancel))
|
||||
_pthread_exit(PTHREAD_CANCELED);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue