看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) linux 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) pthread 問題(Question): 有辦法自己指定thread要到哪個cpu上執行嗎? 或是可以有get cpu id等function知道cpu的id嗎? 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.225.128
tropical72:SetThreadAffinityMask 09/27 10:20
tropical72:抱歉,誤會一場,上面 api 是在 win, linux 上要再查一下 09/27 10:22
final01:tool "schedutils"也可順便參考它的 code 09/27 15:52
firejox:請愛用man page好嗎... 09/27 20:03
firejox:man pthreads ... 09/27 20:03
Rukawa31:sched_setaffinity() 09/29 16:18