for (i = 0; i < 32; i++)
{
hOpened = OpenMutex(0x1 << i, FALSE, "WineTestMutex");
- ReleaseMutex(hCreated);
if(hOpened != NULL)
{
+ ret = ReleaseMutex(hOpened);
+ ok(ret, "ReleaseMutex failed with error %d, access %x\n", GetLastError(), 1 << i);
CloseHandle(hOpened);
}
else
{
+ ReleaseMutex(hCreated);
failed |=0x1 << i;
}
}
struct mutex *mutex = (struct mutex *)obj;
assert( obj->ops == &mutex_ops );
- if (!(access & SYNCHRONIZE)) /* FIXME: MUTEX_MODIFY_STATE? */
+ if (!(access & SYNCHRONIZE))
{
set_error( STATUS_ACCESS_DENIED );
return 0;
struct mutex *mutex;
if ((mutex = (struct mutex *)get_handle_obj( current->process, req->handle,
- MUTEX_MODIFY_STATE, &mutex_ops )))
+ 0, &mutex_ops )))
{
if (!mutex->count || (mutex->owner != current)) set_error( STATUS_MUTANT_NOT_OWNED );
else