This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.3] Followup to C++ forced unwinding


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Mitchell wrote:

> Maybe you could point me at the source code for one of these thread
> library implementations where (1) holds, but (2) does not?

Just look at the code.

Cancellation is idempotent.  Therefore a flag is set so that
cancellation cannot happen in cancellation handlers.  If the program
continues cancellation won't be possible anymore and the program can get
stuck.  pthread_exit() doesn't work anymore is one other thing.  In
other implementation (maybe even in LinuxThreads) you get endless loops
of calling cleanup handlers.

There are countless ways this can go wrong.  The requirements POSIX sets
on cancellationare so that it has to be stateful.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+sLHu2ijCOnn/RHQRAjD4AKC78X4bS09XSxuehq9sfgoyJK+wvACbBNYa
C3QOpfNU7ZVpYX/z90WpQeo=
=y066
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]