Quote:
A thread can specify a mutex that it already owns in a call to one of the wait functions without blocking its execution. This prevents a thread from deadlocking itself while waiting for a mutex that it already owns. However, to release its ownership, the thread must call ReleaseMutex one time for each time that it obtained ownership (either through CreateMutex or a wait function).
To the OP: Why do you need to "block" a second call to your function. It's not possible for a single thread to call the same function more than once at the same time. Other effects might arise within the context of a single thread (such as re-entrancy issues or deliberately recursive functions), but since these are all executed in the context of a single thread, there are always simple alternatives for dealing with the issue (e.g., set a flag in thread-local memory).