mirror of
https://github.com/snowie2000/mactype.git
synced 2025-01-05 10:17:02 +08:00
15 lines
518 B
C
15 lines
518 B
C
#include <windows.h>
|
|
|
|
typedef struct _OWNED_CRITIAL_SECTION
|
|
{
|
|
int nOwner, nRequests, nRecursiveCount;
|
|
HANDLE hEvent;
|
|
CRITICAL_SECTION threadLock;
|
|
}OWNED_CRITIAL_SECTION, *POWNED_CRITIAL_SECTION;
|
|
//用于自定义临界区
|
|
|
|
void WINAPI InitializeOwnedCritialSection(POWNED_CRITIAL_SECTION cs);
|
|
void WINAPI DeleteOwnedCritialSection(POWNED_CRITIAL_SECTION cs);
|
|
void WINAPI EnterOwnedCritialSection(POWNED_CRITIAL_SECTION cs, WORD Owner);
|
|
void WINAPI LeaveOwnedCritialSection(POWNED_CRITIAL_SECTION cs, WORD Owner);
|