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
@ -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 New Issue
Block a user