This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

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






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