Commit 1409b421 authored by Alexandre Julliard's avatar Alexandre Julliard

wow64: Add thunks for some general synchronization syscalls.

parent 89ad6974
...@@ -283,6 +283,18 @@ NTSTATUS WINAPI wow64_NtDebugContinue( UINT *args ) ...@@ -283,6 +283,18 @@ NTSTATUS WINAPI wow64_NtDebugContinue( UINT *args )
/********************************************************************** /**********************************************************************
* wow64_NtDelayExecution
*/
NTSTATUS WINAPI wow64_NtDelayExecution( UINT *args )
{
BOOLEAN alertable = get_ulong( &args );
const LARGE_INTEGER *timeout = get_ptr( &args );
return NtDelayExecution( alertable, timeout );
}
/**********************************************************************
* wow64_NtOpenDirectoryObject * wow64_NtOpenDirectoryObject
*/ */
NTSTATUS WINAPI wow64_NtOpenDirectoryObject( UINT *args ) NTSTATUS WINAPI wow64_NtOpenDirectoryObject( UINT *args )
...@@ -557,6 +569,18 @@ NTSTATUS WINAPI wow64_NtQueryMutant( UINT *args ) ...@@ -557,6 +569,18 @@ NTSTATUS WINAPI wow64_NtQueryMutant( UINT *args )
/********************************************************************** /**********************************************************************
* wow64_NtQueryPerformanceCounter
*/
NTSTATUS WINAPI wow64_NtQueryPerformanceCounter( UINT *args )
{
LARGE_INTEGER *counter = get_ptr( &args );
LARGE_INTEGER *frequency = get_ptr( &args );
return NtQueryPerformanceCounter( counter, frequency );
}
/**********************************************************************
* wow64_NtQuerySemaphore * wow64_NtQuerySemaphore
*/ */
NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args ) NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args )
...@@ -605,6 +629,19 @@ NTSTATUS WINAPI wow64_NtQueryTimer( UINT *args ) ...@@ -605,6 +629,19 @@ NTSTATUS WINAPI wow64_NtQueryTimer( UINT *args )
/********************************************************************** /**********************************************************************
* wow64_NtQueryTimerResolution
*/
NTSTATUS WINAPI wow64_NtQueryTimerResolution( UINT *args )
{
ULONG *min_res = get_ptr( &args );
ULONG *max_res = get_ptr( &args );
ULONG *current_res = get_ptr( &args );
return NtQueryTimerResolution( min_res, max_res, current_res );
}
/**********************************************************************
* wow64_NtReleaseKeyedEvent * wow64_NtReleaseKeyedEvent
*/ */
NTSTATUS WINAPI wow64_NtReleaseKeyedEvent( UINT *args ) NTSTATUS WINAPI wow64_NtReleaseKeyedEvent( UINT *args )
...@@ -716,6 +753,33 @@ NTSTATUS WINAPI wow64_NtSetTimer( UINT *args ) ...@@ -716,6 +753,33 @@ NTSTATUS WINAPI wow64_NtSetTimer( UINT *args )
/********************************************************************** /**********************************************************************
* wow64_NtSetTimerResolution
*/
NTSTATUS WINAPI wow64_NtSetTimerResolution( UINT *args )
{
ULONG res = get_ulong( &args );
BOOLEAN set = get_ulong( &args );
ULONG *current_res = get_ptr( &args );
return NtSetTimerResolution( res, set, current_res );
}
/**********************************************************************
* wow64_NtSignalAndWaitForSingleObject
*/
NTSTATUS WINAPI wow64_NtSignalAndWaitForSingleObject( UINT *args )
{
HANDLE signal = get_handle( &args );
HANDLE wait = get_handle( &args );
BOOLEAN alertable = get_ulong( &args );
const LARGE_INTEGER *timeout = get_ptr( &args );
return NtSignalAndWaitForSingleObject( signal, wait, alertable, timeout );
}
/**********************************************************************
* wow64_NtTerminateJobObject * wow64_NtTerminateJobObject
*/ */
NTSTATUS WINAPI wow64_NtTerminateJobObject( UINT *args ) NTSTATUS WINAPI wow64_NtTerminateJobObject( UINT *args )
...@@ -813,3 +877,44 @@ NTSTATUS WINAPI wow64_NtWaitForKeyedEvent( UINT *args ) ...@@ -813,3 +877,44 @@ NTSTATUS WINAPI wow64_NtWaitForKeyedEvent( UINT *args )
return NtWaitForKeyedEvent( handle, key, alertable, timeout ); return NtWaitForKeyedEvent( handle, key, alertable, timeout );
} }
/**********************************************************************
* wow64_NtWaitForMultipleObjects
*/
NTSTATUS WINAPI wow64_NtWaitForMultipleObjects( UINT *args )
{
DWORD count = get_ulong( &args );
LONG *handles_ptr = get_ptr( &args );
BOOLEAN wait_any = get_ulong( &args );
BOOLEAN alertable = get_ulong( &args );
const LARGE_INTEGER *timeout = get_ptr( &args );
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
DWORD i;
for (i = 0; i < count && i < MAXIMUM_WAIT_OBJECTS; i++) handles[i] = LongToHandle( handles_ptr[i] );
return NtWaitForMultipleObjects( count, handles, wait_any, alertable, timeout );
}
/**********************************************************************
* wow64_NtWaitForSingleObject
*/
NTSTATUS WINAPI wow64_NtWaitForSingleObject( UINT *args )
{
HANDLE handle = get_handle( &args );
BOOLEAN alertable = get_ulong( &args );
const LARGE_INTEGER *timeout = get_ptr( &args );
return NtWaitForSingleObject( handle, alertable, timeout );
}
/**********************************************************************
* wow64_NtYieldExecution
*/
NTSTATUS WINAPI wow64_NtYieldExecution( UINT *args )
{
return NtYieldExecution();
}
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
SYSCALL_ENTRY( NtCreateSymbolicLinkObject ) \ SYSCALL_ENTRY( NtCreateSymbolicLinkObject ) \
SYSCALL_ENTRY( NtCreateTimer ) \ SYSCALL_ENTRY( NtCreateTimer ) \
SYSCALL_ENTRY( NtDebugContinue ) \ SYSCALL_ENTRY( NtDebugContinue ) \
SYSCALL_ENTRY( NtDelayExecution ) \
SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtDeleteAtom ) \
SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtFindAtom ) \
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
...@@ -60,9 +61,11 @@ ...@@ -60,9 +61,11 @@
SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \
SYSCALL_ENTRY( NtQueryIoCompletion ) \ SYSCALL_ENTRY( NtQueryIoCompletion ) \
SYSCALL_ENTRY( NtQueryMutant ) \ SYSCALL_ENTRY( NtQueryMutant ) \
SYSCALL_ENTRY( NtQueryPerformanceCounter ) \
SYSCALL_ENTRY( NtQuerySemaphore ) \ SYSCALL_ENTRY( NtQuerySemaphore ) \
SYSCALL_ENTRY( NtQuerySymbolicLinkObject ) \ SYSCALL_ENTRY( NtQuerySymbolicLinkObject ) \
SYSCALL_ENTRY( NtQueryTimer ) \ SYSCALL_ENTRY( NtQueryTimer ) \
SYSCALL_ENTRY( NtQueryTimerResolution ) \
SYSCALL_ENTRY( NtReleaseKeyedEvent ) \ SYSCALL_ENTRY( NtReleaseKeyedEvent ) \
SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtReleaseMutant ) \
SYSCALL_ENTRY( NtReleaseSemaphore ) \ SYSCALL_ENTRY( NtReleaseSemaphore ) \
...@@ -73,8 +76,13 @@ ...@@ -73,8 +76,13 @@
SYSCALL_ENTRY( NtSetInformationDebugObject ) \ SYSCALL_ENTRY( NtSetInformationDebugObject ) \
SYSCALL_ENTRY( NtSetIoCompletion ) \ SYSCALL_ENTRY( NtSetIoCompletion ) \
SYSCALL_ENTRY( NtSetTimer ) \ SYSCALL_ENTRY( NtSetTimer ) \
SYSCALL_ENTRY( NtSetTimerResolution ) \
SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
SYSCALL_ENTRY( NtTerminateJobObject ) \ SYSCALL_ENTRY( NtTerminateJobObject ) \
SYSCALL_ENTRY( NtWaitForDebugEvent ) \ SYSCALL_ENTRY( NtWaitForDebugEvent ) \
SYSCALL_ENTRY( NtWaitForKeyedEvent ) SYSCALL_ENTRY( NtWaitForKeyedEvent ) \
SYSCALL_ENTRY( NtWaitForMultipleObjects ) \
SYSCALL_ENTRY( NtWaitForSingleObject ) \
SYSCALL_ENTRY( NtYieldExecution )
#endif /* __WOW64_SYSCALL_H */ #endif /* __WOW64_SYSCALL_H */
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