LeaveCriticalSection

  VOID LeaveCriticalSection(lpCriticalSection)    
  LPCRITICAL_SECTION lpCriticalSection;    

An application thread may leave a previously entered critical section using LeaveCriticalSection.

Parameters

lpCriticalSection

Supplies the address of a critical section object to leave.

Return Value

This function does not return a value.

Comments

Leaving a critical section causes the calling thread to decrement the entered count of the critical section object. Once this count decrements to one, the critical section enters the signaled state and the thread's ownership of the critical section is relinquished.

It is an error to leave a critical section not owned by the calling thread.

See Also

EnterCriticalSection, InitializeCriticalSection, DeleteCriticalSection