This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
gdb.threads/sigthread.c
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jimb at red-bean dot com
- Cc: gdb at sourceware dot org
- Date: Mon, 18 Feb 2008 10:03:16 +0100 (CET)
- Subject: gdb.threads/sigthread.c
Hi Jim,
You recently changed gdb.threads/sigthread.c to use barriers.
Unfortunately the pthread_barrier_xxx() interfaces are not found in
the standard POSIX threads standard, but part of the Advanced Realtime
Threads POSIX extension. Therefore they are not widely available.
Could you change the test to use a more standard synchronisation
mechanism? I guess having a global variable of type volatile
sig_atomic_t, setting it to a non-zero value in main() (after the
threads have been created) and checking the value in child_two() and
thread_function() (perhaps calling sched_yield() if the variables
isn't set yet) would do the trick.
I can roll you a diff to do this if you want, but I don't think I have
access to a system that shows the problem you tried to fix.
Thanks,
Mark