test cancel_pending to save a thr_wake call in some specical cases.

This commit is contained in:
David Xu 2006-12-06 00:15:35 +00:00
parent 56073c9eac
commit b774466b61

View File

@ -61,7 +61,7 @@ sigcancel_handler(int sig __unused,
{
struct pthread *curthread = _get_curthread();
if (curthread->cancel_defer)
if (curthread->cancel_defer && curthread->cancel_pending)
thr_wake(curthread->tid);
_thr_ast(curthread);
}