2016-05-30 17:12:15 +08:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
typedef struct _OWNED_CRITIAL_SECTION
|
|
|
|
{
|
|
|
|
int nOwner, nRequests, nRecursiveCount;
|
|
|
|
HANDLE hEvent;
|
|
|
|
CRITICAL_SECTION threadLock;
|
|
|
|
}OWNED_CRITIAL_SECTION, *POWNED_CRITIAL_SECTION;
|
2020-12-06 17:00:05 +08:00
|
|
|
//用于自定义临界区
|
2016-05-30 17:12:15 +08:00
|
|
|
|
|
|
|
void WINAPI InitializeOwnedCritialSection(POWNED_CRITIAL_SECTION cs);
|
|
|
|
void WINAPI DeleteOwnedCritialSection(POWNED_CRITIAL_SECTION cs);
|
|
|
|
void WINAPI EnterOwnedCritialSection(POWNED_CRITIAL_SECTION cs, WORD Owner);
|
2020-12-06 17:00:05 +08:00
|
|
|
void WINAPI LeaveOwnedCritialSection(POWNED_CRITIAL_SECTION cs, WORD Owner);
|