This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: catch(...) and forced unwind
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: David Abrahams <dave at boost-consulting dot com>, Jason Merrill <jason at redhat dot com>, Matt Austern <austern at apple dot com>, Ulrich Drepper <drepper at redhat dot com>, gcc at gcc dot gnu dot org, Nathan Myers <ncm at cantrip dot org>, Jakub Jelinek <jakub at redhat dot com>, wekempf at cox dot net, fjh at cs dot mu dot oz dot au, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 17 Dec 2003 13:20:33 -0800
- Subject: Re: catch(...) and forced unwind
- Organization: CodeSourcery, LLC
- References: <A156A7B0-3012-11D8-8564-00039390D9E0@apple.com> <uu1409v32.fsf@boost-consulting.com> <xypd6aoi0zz.fsf@miranda.boston.redhat.com> <1071632782.3793.114.camel@minax.codesourcery.com> <u4qvz8zae.fsf@boost-consulting.com> <1071678864.4082.22.camel@minax.codesourcery.com> <u3cbjmlgc.fsf@boost-consulting.com> <1071681263.4082.30.camel@minax.codesourcery.com> <uk74vjo92.fsf@boost-consulting.com> <1071686175.21686.9.camel@doubledemon.codesourcery.com> <20031217203056.GB4680@redhat.com>
- Reply-to: mark at codesourcery dot com
On Wed, 2003-12-17 at 12:30, Richard Henderson wrote:
> On Wed, Dec 17, 2003 at 10:36:15AM -0800, Mark Mitchell wrote:
> > That would also be a POSIX threads extension; essentially, this would be
> > the deferred cancellation model, except that pthread_testcancel would be
> > the only cancellation point.
>
> I would think that disabling cancellation and then using testcancel
> would be equivalent.
I don't think so; pthread_setcancelstate (PTHREAD_CANCEL_DISABLE) means
that the thread will not receive cancellation requests at all.
What David was proposing was that the cancellation request would be
received, but queued until pthread_testcancel was called. In
particular, "write" and such would not be cancellation points.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC