Commit e1a4fbe7 authored by Alexandre Julliard's avatar Alexandre Julliard

wow64: Add thunks for the semaphore syscalls.

parent 2b093118
......@@ -84,6 +84,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
*/
NTSTATUS WINAPI wow64_NtOpenEvent( UINT *args )
......@@ -124,6 +146,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
*/
NTSTATUS WINAPI wow64_NtPulseEvent( UINT *args )
......@@ -166,6 +208,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
*/
NTSTATUS WINAPI wow64_NtReleaseMutant( UINT *args )
......@@ -178,6 +235,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
*/
NTSTATUS WINAPI wow64_NtResetEvent( UINT *args )
......
......@@ -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 ) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment