Dan*_*nov 4 winapi synchronization
Win32 CRITICAL_SECTION包含哪些数据,它有多大?
这是没有记录的,可能是具体的实现,但我很想知道
这是我安装的Windows Vista SDK:
WINNT.H:
typedef struct _RTL_CRITICAL_SECTION {
PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
//
// The following three fields control entering and exiting the critical
// section for the resource
//
LONG LockCount;
LONG RecursionCount;
HANDLE OwningThread; // from the thread's ClientId->UniqueThread
HANDLE LockSemaphore;
ULONG_PTR SpinCount; // force size on 64-bit systems when packed
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
Run Code Online (Sandbox Code Playgroud)
WINBASE.H:
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
Run Code Online (Sandbox Code Playgroud)