[問題] CreateMutex參數疑問

看板C_and_CPP作者 (我愛阿蓉)時間16年前 (2010/01/21 02:36), 編輯推噓0(003)
留言3則, 1人參與, 最新討論串1/3 (看更多)
http://msdn.microsoft.com/en-us/library/ms682411(VS.85).aspx 我想問第二個參數 bInitialOwner [in] If this value is TRUE and the caller created the mutex, 誰呼叫他 在main呼叫caller就是main the calling thread obtains initial ownership of the mutex object. Otherwise, the calling thread ^^^^^^^^^^^^^^ 主程式呼叫他的話 calling thread就是main? 所謂ownership該如何解釋@@? 有沒有得到ownership又是什麼情況呢.....好抽象 does not obtain ownership of the mutex. To determine if the caller created the mutex, see the Return Values section. 到底意思是什麼.... 我做了些實驗結果很詭異(再下一篇@@) 我不想瞎猜 請教一下各位 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.192.73.81

01/21 11:36, , 1F
mutual exclusion又叫mutual exclusion lock或直接稱
01/21 11:36, 1F

01/21 11:37, , 2F
lock, 要進ME需先 acquire lock, 成功者就叫lock owner
01/21 11:37, 2F

01/21 11:38, , 3F
也就是可以進入critical section的那個process/thread
01/21 11:38, 3F
文章代碼(AID): #1BLqqwKD (C_and_CPP)
文章代碼(AID): #1BLqqwKD (C_and_CPP)