0
我的問題gdb的輸出:僵局pthread_cond_destroy()在
Program received signal SIGINT, Interrupt. 0x00007ffff7bcb86b in
__lll_lock_wait_private() from /lib/x86_64-linux-gnu/libpthread.so.0 (gdb) bt
#0 0x00007ffff7bcb86b in __lll_lock_wait_private() from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007ffff7bc8bf7 in _L_lock_21() from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007ffff7bc8a6e in [email protected]@GLIBC_2.3.2() from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x0000000000400ab5 in control_destroy (mycontrol=0x6020c0) at control.c:20
#4 0x0000000000400f36 in cleanup_structs() at workcrew.c:160
#5 0x0000000000401027 in main() at workcrew.c:201
注:在Cygwin中成功運行的程序,但在Ubuntu Linux操作系統,它的僵局運行。 所有子線程在死鎖之前連接完成。
的源代碼是從網頁:http://www.ibm.com/developerworks/cn/linux/thread/posix_thread3/thread-3.tar.gz
好的,非常感謝 – user2944046