ntdll: Fix prev_count from NtReleaseMutant.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
142730ea66
commit
7950562e9e
|
@ -510,7 +510,7 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
|
||||||
{
|
{
|
||||||
req->handle = wine_server_obj_handle( handle );
|
req->handle = wine_server_obj_handle( handle );
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
if (prev_count) *prev_count = reply->prev_count;
|
if (prev_count) *prev_count = 1 - reply->prev_count;
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
return status;
|
return status;
|
||||||
|
|
|
@ -1942,12 +1942,12 @@ static void test_mutant(void)
|
||||||
prev = 0xdeadbeef;
|
prev = 0xdeadbeef;
|
||||||
status = pNtReleaseMutant(mutant, &prev);
|
status = pNtReleaseMutant(mutant, &prev);
|
||||||
ok( status == STATUS_SUCCESS, "NtQueryRelease failed %08x\n", status );
|
ok( status == STATUS_SUCCESS, "NtQueryRelease failed %08x\n", status );
|
||||||
todo_wine ok( prev == -1, "NtQueryRelease failed, expected -1, got %d\n", prev );
|
ok( prev == -1, "NtQueryRelease failed, expected -1, got %d\n", prev );
|
||||||
|
|
||||||
prev = 0xdeadbeef;
|
prev = 0xdeadbeef;
|
||||||
status = pNtReleaseMutant(mutant, &prev);
|
status = pNtReleaseMutant(mutant, &prev);
|
||||||
ok( status == STATUS_SUCCESS, "NtQueryRelease failed %08x\n", status );
|
ok( status == STATUS_SUCCESS, "NtQueryRelease failed %08x\n", status );
|
||||||
todo_wine ok( prev == 0, "NtQueryRelease failed, expected 0, got %d\n", prev );
|
ok( prev == 0, "NtQueryRelease failed, expected 0, got %d\n", prev );
|
||||||
|
|
||||||
memset(&info, 0xcc, sizeof(info));
|
memset(&info, 0xcc, sizeof(info));
|
||||||
status = pNtQueryMutant(mutant, MutantBasicInformation, &info, sizeof(info), NULL);
|
status = pNtQueryMutant(mutant, MutantBasicInformation, &info, sizeof(info), NULL);
|
||||||
|
|
Loading…
Reference in New Issue