Windows??????????????????
???????????? ???????[ 2013/2/7 9:42:34 ] ????????
?????????????????????????????????????????????????????????????????????????????????к???????????????????????CPU????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????л??????????????????????????????????????????????????????????????????????????????????????????????Ρ?
????????Ρ?????????С?δ???????????????????Щ???????????????????????????д??????????????з????????????????????δ????????????????????ù???ε???????£?
????CRITICAL_SECTION g_cs;//???????CRITICAL_SECTION???
????InitializeCriticalSection(&g_cs);//?????g_cs????
????EnterCriticalSection(&g_cs);//????????
????LeaveCriticalSection(&g_cs);//???????
????DeleteCriticalSection(&g_cs);//????g_cs
????EnterCriticalSection?????CRITICAL_SECTION????????????Щ???????????????????????????????????????????????EnterCriticalSection??????Щ??????????????????????????EnterCriticalSection????±???????????????????????????????????????EnterCriticalSection???????????й?????е????????????????????????????????????????EnterCriticalSection??????????????????????л???????????????????????????CPU?????????????????????????????????????????????LeaveCriticalSection?????????????CRITICAL_SECTION???????????????????????л???????????
????LeaveCriticalSection?????CRITICAL_SECTION???????????????????????????????????0??LeaveCriticalSection????3??????????????????????????????е???????????????????л????????????
???????????????????????????????????????Σ?????????μ?????л?????????????ζ?????????????л??????????????л???????????1000??CPU???????????????????????????EnterCriticalSection????????????????????????????л??????????????????????????Щ???????????????????????????????????μ?????????л???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????CPU???????????????????μ?????л????????????????????????????????????μ?????л???????????
????Silm??/д????SRWLock????????????????????????????????????????????????????????????????????????д??????????????????????????????????????????????????????????д????????д???????????????????????????????????
??????д?????????????£???????β????????????
????RTL_SRWLOCK lock;
????InitializeSRWLock(&lock);
????AcquireSRWLockExclusive(&lock);//???????????
????ReleaseSRWLockExclusive(&lock);
????AcquireSRWLockShared(&lock);//???????????
????ReleaseSRWLockShared(&lock);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11