Daniel Lehman : ntdll: Fix prev_count from NtReleaseMutant.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue May 3 11:15:34 CDT 2016
Module: wine
Branch: master
Commit: 7950562e9e7faf26a13fc542845462094f4fa875
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7950562e9e7faf26a13fc542845462094f4fa875
Author: Daniel Lehman <dlehman25 at gmail.com>
Date: Tue May 3 02:55:43 2016 +0200
ntdll: Fix prev_count from NtReleaseMutant.
Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/sync.c | 2 +-
dlls/ntdll/tests/om.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index 46cbca7..e949df6 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -510,7 +510,7 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
{
req->handle = wine_server_obj_handle( handle );
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;
return status;
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 2bc4ccd..64a16ab 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -1942,12 +1942,12 @@ static void test_mutant(void)
prev = 0xdeadbeef;
status = pNtReleaseMutant(mutant, &prev);
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;
status = pNtReleaseMutant(mutant, &prev);
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));
status = pNtQueryMutant(mutant, MutantBasicInformation, &info, sizeof(info), NULL);
More information about the wine-cvs
mailing list