wow64: Add thunks for the semaphore syscalls.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-07-23 16:51:33 +02:00
parent 2b0931182b
commit e1a4fbe730
2 changed files with 74 additions and 0 deletions

View File

@ -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
*/

View File

@ -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 ) \