摘要:
1:用Interlocked系列函數(shù)實現(xiàn)線程同步;2:用CRITICAL_SECTION及其系列函數(shù)實現(xiàn)線程同步;3:用RTL_SRWLOCK及其系列函數(shù)實現(xiàn)線程同步;4:用事件內(nèi)核對象實現(xiàn)線程同步;5:用信號量內(nèi)核對象實現(xiàn)線程同步;1:用Interlocked系列函數(shù)實現(xiàn)線程同步實例如下://旋轉(zhuǎn)鎖#include using namespace std; #include #include const int threadNum=10;HANDLE hThread[threadNum];volatile unsigned int ISOK=0;unsigned int _stdcal... 閱讀全文
posted @ 2013-03-31 14:46
古文觀芷
閱讀(24517)
評論(1)
推薦(3)
浙公網(wǎng)安備 33010602011771號