[問題] semaphore 的問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
#include <pthread.h>
#include <semaphore.h>
問題(Question):
在程式碼 84 行的地方 輸出的時候會一直是同一個 thread 輸出
我覺得應該是不同的 thread 會輸出
不曉得是什麼原因
程式碼(Code):(請善用置底文網頁, 記得排版)
http://pastie.org/1996573
補充說明(Supplement):
但是那行去掉之後 程式就可以正常執行
麻煩各位大大解惑 謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.32.59
→
06/01 09:30, , 1F
06/01 09:30, 1F
→
06/01 13:09, , 2F
06/01 13:09, 2F
→
06/01 15:45, , 3F
06/01 15:45, 3F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章