diff options
author | wtc%google.com <devnull@localhost> | 2008-08-15 01:25:35 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2008-08-15 01:25:35 +0000 |
commit | c0048d9c191031fa767d84564211758d9d4c9894 (patch) | |
tree | 3e43bcb38ab4d575f699daf16f5631d530d5ac42 | |
parent | ac36a42b8671201813f0cd517397efb613c4d6e5 (diff) | |
download | nspr-hg-c0048d9c191031fa767d84564211758d9d4c9894.tar.gz |
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.
-rw-r--r-- | pr/src/pthreads/ptio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 62febde2..715f0314 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -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; |