when I define :CRITICAL_SECTION cs;
EnterCriticalSection(&cs);
//processing…………………………
LeaveCriticalSection(&cs);
The values of cs are as follows:
(The initial value LockCount=-1)
cs {DebugInfo=0x0056d3a8 LockCount=-78 RecursionCount=1 ...} _RTL_CRITICAL_SECTION
DebugInfo 0x0056d3a8 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x0194d364 ...} _RTL_CRITICAL_SECTION_DEBUG *
LockCount -78 long
RecursionCount 1 long
OwningThread 0x000038e8 void *
LockSemaphore 0x00000168 void *
SpinCount 0 unsigned long
I am confusd about the value of LockCount=-78.I suppose it should be >=0,but the fact is not .
Can someone tell me why? please?