Alexandre Julliard : wow64: Add thunks for the semaphore syscalls.
Alexandre Julliard
julliard at winehq.org
Fri Jul 23 18:08:01 CDT 2021
Module: wine
Branch: master
Commit: e1a4fbe7307cb1ac842a00894b8a3438df012544
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e1a4fbe7307cb1ac842a00894b8a3438df012544
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jul 23 16:51:33 2021 +0200
wow64: Add thunks for the semaphore syscalls.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wow64/sync.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
dlls/wow64/syscall.h | 4 +++
2 files changed, 74 insertions(+)
diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c
index 2ca7764c3cd..bd7e20ca02c 100644
--- a/dlls/wow64/sync.c
+++ b/dlls/wow64/sync.c
@@ -83,6 +83,28 @@ NTSTATUS WINAPI wow64_NtCreateMutant( UINT *args )
}
+/**********************************************************************
+ * wow64_NtCreateSemaphore
+ */
+NTSTATUS WINAPI wow64_NtCreateSemaphore( UINT *args )
+{
+ ULONG *handle_ptr = get_ptr( &args );
+ ACCESS_MASK access = get_ulong( &args );
+ OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
+ LONG initial = get_ulong( &args );
+ LONG max = get_ulong( &args );
+
+ struct object_attr64 attr;
+ HANDLE handle = 0;
+ NTSTATUS status;
+
+ *handle_ptr = 0;
+ status = NtCreateSemaphore( &handle, access, objattr_32to64( &attr, attr32 ), initial, max );
+ put_handle( handle_ptr, handle );
+ return status;
+}
+
+
/**********************************************************************
* wow64_NtOpenEvent
*/
@@ -123,6 +145,26 @@ NTSTATUS WINAPI wow64_NtOpenMutant( UINT *args )
}
+/**********************************************************************
+ * wow64_NtOpenSemaphore
+ */
+NTSTATUS WINAPI wow64_NtOpenSemaphore( UINT *args )
+{
+ ULONG *handle_ptr = get_ptr( &args );
+ ACCESS_MASK access = get_ulong( &args );
+ OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
+
+ struct object_attr64 attr;
+ HANDLE handle = 0;
+ NTSTATUS status;
+
+ *handle_ptr = 0;
+ status = NtOpenSemaphore( &handle, access, objattr_32to64( &attr, attr32 ));
+ put_handle( handle_ptr, handle );
+ return status;
+}
+
+
/**********************************************************************
* wow64_NtPulseEvent
*/
@@ -165,6 +207,21 @@ NTSTATUS WINAPI wow64_NtQueryMutant( UINT *args )
}
+/**********************************************************************
+ * wow64_NtQuerySemaphore
+ */
+NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args )
+{
+ HANDLE handle = get_handle( &args );
+ SEMAPHORE_INFORMATION_CLASS class = get_ulong( &args );
+ void *info = get_ptr( &args );
+ ULONG len = get_ulong( &args );
+ ULONG *retlen = get_ptr( &args );
+
+ return NtQuerySemaphore( handle, class, info, len, retlen );
+}
+
+
/**********************************************************************
* wow64_NtReleaseMutant
*/
@@ -177,6 +234,19 @@ NTSTATUS WINAPI wow64_NtReleaseMutant( UINT *args )
}
+/**********************************************************************
+ * wow64_NtReleaseSemaphore
+ */
+NTSTATUS WINAPI wow64_NtReleaseSemaphore( UINT *args )
+{
+ HANDLE handle = get_handle( &args );
+ ULONG count = get_ulong( &args );
+ ULONG *previous = get_ptr( &args );
+
+ return NtReleaseSemaphore( handle, count, previous );
+}
+
+
/**********************************************************************
* wow64_NtResetEvent
*/
diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h
index 8481db2a587..bb9f220332c 100644
--- a/dlls/wow64/syscall.h
+++ b/dlls/wow64/syscall.h
@@ -29,11 +29,13 @@
SYSCALL_ENTRY( NtClose ) \
SYSCALL_ENTRY( NtCreateEvent ) \
SYSCALL_ENTRY( NtCreateMutant ) \
+ SYSCALL_ENTRY( NtCreateSemaphore ) \
SYSCALL_ENTRY( NtDeleteAtom ) \
SYSCALL_ENTRY( NtFindAtom ) \
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
SYSCALL_ENTRY( NtOpenEvent ) \
SYSCALL_ENTRY( NtOpenMutant ) \
+ SYSCALL_ENTRY( NtOpenSemaphore ) \
SYSCALL_ENTRY( NtPulseEvent ) \
SYSCALL_ENTRY( NtQueryDefaultLocale ) \
SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \
@@ -41,7 +43,9 @@
SYSCALL_ENTRY( NtQueryInformationAtom ) \
SYSCALL_ENTRY( NtQueryInstallUILanguage ) \
SYSCALL_ENTRY( NtQueryMutant ) \
+ SYSCALL_ENTRY( NtQuerySemaphore ) \
SYSCALL_ENTRY( NtReleaseMutant ) \
+ SYSCALL_ENTRY( NtReleaseSemaphore ) \
SYSCALL_ENTRY( NtResetEvent ) \
SYSCALL_ENTRY( NtSetDefaultLocale ) \
SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
More information about the wine-cvs
mailing list