This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Why is cancellation enabled in start_thread?
- From: Daniel Jacobowitz <drow at false dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 11 Feb 2005 21:26:38 -0500
- Subject: Why is cancellation enabled in start_thread?
I'm trying to debug an (unrelated) problem in tst-cancel17.c on the
MIPS NPTL port. When I run the test under a debugger,
pd->stopped_start is set so that the thread creation event can be
reported. This means that the test might go to sleep in lll_lock,
with async cancellation enabled.
So now the thread be cancelled before the thread function runs - and
before it calls pthread_barrier_wait. The test program hangs in
do_wait because the early cancellation of tf prevented it from calling
pthread_barrier_wait before it exited.
Why enable cancellation here? The thread handle hasn't been returned
to the application yet, so nothing could cancel it.
--
Daniel Jacobowitz
CodeSourcery, LLC