On Feb 18, 2008 1:03 AM, Mark Kettenis wrote: > 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. Yeah, I mentioned this concern when I posted the patch. I guess we know now. > 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'll bet this isn't the only test in the test suite that would like some barriers. How does the attached look? > 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. I developed the fix on a Core 2 Duo laptop running Linux, running 'while true; do :;done' in a few windows while running the test over and over again as 'while runtest sigthread.exp; do :;done'. Or something like that. It sometimes took a half-dozen iterations or so, but it would fail eventually.