Bug 450224: Use the _PT_THREAD_INTERRUPTED macro to test the

PT_THREAD_ABORTED flag so that we take into account whether interrupts are
being blocked.  Thanks to Joachim Ziegler <ziegler@mpi-sb.mpg.de> for
testing this patch.  r=nelson.


git-svn-id: svn://10.0.0.236/trunk@253606 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%google.com 2008-08-15 01:25:35 +00:00
parent cd5e56823e
commit d64d457172

View File

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@ -456,7 +456,7 @@ static void pt_poll_now_with_select(pt_Continuation *op)
rv = select(op->arg1.osfd + 1, rdp, wrp, NULL, &tv);
if (self->state & PT_THREAD_ABORTED)
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@ -517,7 +517,7 @@ static void pt_poll_now_with_select(pt_Continuation *op)
tv.tv_usec = (msecs % PR_MSEC_PER_SEC) * PR_USEC_PER_MSEC;
rv = select(op->arg1.osfd + 1, rdp, wrp, NULL, &tv);
if (self->state & PT_THREAD_ABORTED)
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@ -598,7 +598,7 @@ static void pt_poll_now(pt_Continuation *op)
rv = poll(&tmp_pfd, 1, msecs);
if (self->state & PT_THREAD_ABORTED)
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;
@ -656,7 +656,7 @@ static void pt_poll_now(pt_Continuation *op)
}
rv = poll(&tmp_pfd, 1, msecs);
if (self->state & PT_THREAD_ABORTED)
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
op->result.code = -1;