M
Marcin Grzegorczyk
sfuerst said:[...]
Assuming you use a CS as a mutex, then the only nontrivial thing to
have is PTHREAD_MUTEX_INITIALIZER. Fortunately, recent versions of
Microsoft windows allow static initialization of these via the
definition:
#define PTHREAD_MUTEX_INITIALIZER {(void*)-1,-1,0,0,0,0}
Can you point me to some documentation please?
The CRITICAL_SECTION structure is defined in Winnt.h
Description of what the fields do is described here:
http://msdn.microsoft.com/en-us/magazine/cc164040.aspx
Note, however, that the article is not an official Microsoft
documentation, and indeed there's an Editor's Note at the top, which
says one should not use such tricks in production code.