[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/14] Adding recursive locks



On 03/18/2010 06:04 PM, Eric Blake wrote:
>>
>>  ACK.  I had to double-check MSDN to make sure that threads-win32 already
>>  creates recursive mutex by default.
>
>  I don't supposed you read if its possible to make it non-recursive, since
>  the orginal impl is supposed to be non-recursive !

Unfortunately, I don't see a way:

You use an event instead (automatically reset, initially set):

  hEvent = CreateEvent (NULL, FALSE, TRUE, NULL);

To acquire the mutex you use WaitForSingleObject, to release the mutex you use SetEvent.

Paolo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]