Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
54901695
Commit
54901695
authored
Jul 23, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the timer syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d1171c7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
1 deletion
+103
-1
sync.c
dlls/wow64/sync.c
+86
-0
syscall.h
dlls/wow64/syscall.h
+6
-1
wow64_private.h
dlls/wow64/wow64_private.h
+11
-0
No files found.
dlls/wow64/sync.c
View file @
54901695
...
...
@@ -30,6 +30,18 @@
/**********************************************************************
* wow64_NtCancelTimer
*/
NTSTATUS
WINAPI
wow64_NtCancelTimer
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
BOOLEAN
*
state
=
get_ptr
(
&
args
);
return
NtCancelTimer
(
handle
,
state
);
}
/**********************************************************************
* wow64_NtClearEvent
*/
NTSTATUS
WINAPI
wow64_NtClearEvent
(
UINT
*
args
)
...
...
@@ -106,6 +118,27 @@ NTSTATUS WINAPI wow64_NtCreateSemaphore( UINT *args )
/**********************************************************************
* wow64_NtCreateTimer
*/
NTSTATUS
WINAPI
wow64_NtCreateTimer
(
UINT
*
args
)
{
ULONG
*
handle_ptr
=
get_ptr
(
&
args
);
ACCESS_MASK
access
=
get_ulong
(
&
args
);
OBJECT_ATTRIBUTES32
*
attr32
=
get_ptr
(
&
args
);
TIMER_TYPE
type
=
get_ulong
(
&
args
);
struct
object_attr64
attr
;
HANDLE
handle
=
0
;
NTSTATUS
status
;
*
handle_ptr
=
0
;
status
=
NtCreateTimer
(
&
handle
,
access
,
objattr_32to64
(
&
attr
,
attr32
),
type
);
put_handle
(
handle_ptr
,
handle
);
return
status
;
}
/**********************************************************************
* wow64_NtOpenEvent
*/
NTSTATUS
WINAPI
wow64_NtOpenEvent
(
UINT
*
args
)
...
...
@@ -166,6 +199,26 @@ NTSTATUS WINAPI wow64_NtOpenSemaphore( UINT *args )
/**********************************************************************
* wow64_NtOpenTimer
*/
NTSTATUS
WINAPI
wow64_NtOpenTimer
(
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
=
NtOpenTimer
(
&
handle
,
access
,
objattr_32to64
(
&
attr
,
attr32
));
put_handle
(
handle_ptr
,
handle
);
return
status
;
}
/**********************************************************************
* wow64_NtPulseEvent
*/
NTSTATUS
WINAPI
wow64_NtPulseEvent
(
UINT
*
args
)
...
...
@@ -223,6 +276,21 @@ NTSTATUS WINAPI wow64_NtQuerySemaphore( UINT *args )
/**********************************************************************
* wow64_NtQueryTimer
*/
NTSTATUS
WINAPI
wow64_NtQueryTimer
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
TIMER_INFORMATION_CLASS
class
=
get_ulong
(
&
args
);
void
*
info
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
ULONG
*
retlen
=
get_ptr
(
&
args
);
return
NtQueryTimer
(
handle
,
class
,
info
,
len
,
retlen
);
}
/**********************************************************************
* wow64_NtReleaseMutant
*/
NTSTATUS
WINAPI
wow64_NtReleaseMutant
(
UINT
*
args
)
...
...
@@ -269,3 +337,21 @@ NTSTATUS WINAPI wow64_NtSetEvent( UINT *args )
return
NtSetEvent
(
handle
,
prev_state
);
}
/**********************************************************************
* wow64_NtSetTimer
*/
NTSTATUS
WINAPI
wow64_NtSetTimer
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
LARGE_INTEGER
*
when
=
get_ptr
(
&
args
);
ULONG
apc
=
get_ulong
(
&
args
);
ULONG
apc_param
=
get_ulong
(
&
args
);
BOOLEAN
resume
=
get_ulong
(
&
args
);
ULONG
period
=
get_ulong
(
&
args
);
BOOLEAN
*
state
=
get_ptr
(
&
args
);
return
NtSetTimer
(
handle
,
when
,
apc_32to64
(
apc
),
apc_param_32to64
(
apc
,
apc_param
),
resume
,
period
,
state
);
}
dlls/wow64/syscall.h
View file @
54901695
...
...
@@ -25,17 +25,20 @@
SYSCALL_ENTRY( NtAddAtom ) \
SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \
SYSCALL_ENTRY( NtAllocateUuids ) \
SYSCALL_ENTRY( NtCancelTimer ) \
SYSCALL_ENTRY( NtClearEvent ) \
SYSCALL_ENTRY( NtClose ) \
SYSCALL_ENTRY( NtCreateEvent ) \
SYSCALL_ENTRY( NtCreateMutant ) \
SYSCALL_ENTRY( NtCreateSemaphore ) \
SYSCALL_ENTRY( NtCreateTimer ) \
SYSCALL_ENTRY( NtDeleteAtom ) \
SYSCALL_ENTRY( NtFindAtom ) \
SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
SYSCALL_ENTRY( NtOpenEvent ) \
SYSCALL_ENTRY( NtOpenMutant ) \
SYSCALL_ENTRY( NtOpenSemaphore ) \
SYSCALL_ENTRY( NtOpenTimer ) \
SYSCALL_ENTRY( NtPulseEvent ) \
SYSCALL_ENTRY( NtQueryDefaultLocale ) \
SYSCALL_ENTRY( NtQueryDefaultUILanguage ) \
...
...
@@ -44,11 +47,13 @@
SYSCALL_ENTRY( NtQueryInstallUILanguage ) \
SYSCALL_ENTRY( NtQueryMutant ) \
SYSCALL_ENTRY( NtQuerySemaphore ) \
SYSCALL_ENTRY( NtQueryTimer ) \
SYSCALL_ENTRY( NtReleaseMutant ) \
SYSCALL_ENTRY( NtReleaseSemaphore ) \
SYSCALL_ENTRY( NtResetEvent ) \
SYSCALL_ENTRY( NtSetDefaultLocale ) \
SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
SYSCALL_ENTRY( NtSetEvent )
SYSCALL_ENTRY( NtSetEvent ) \
SYSCALL_ENTRY( NtSetTimer )
#endif
/* __WOW64_SYSCALL_H */
dlls/wow64/wow64_private.h
View file @
54901695
...
...
@@ -63,6 +63,17 @@ static inline ULONG get_ulong( UINT **args ) { return *(*args)++; }
static
inline
HANDLE
get_handle
(
UINT
**
args
)
{
return
LongToHandle
(
*
(
*
args
)
++
);
}
static
inline
void
*
get_ptr
(
UINT
**
args
)
{
return
ULongToPtr
(
*
(
*
args
)
++
);
}
static
inline
void
*
apc_32to64
(
ULONG
func
)
{
return
func
?
Wow64ApcRoutine
:
NULL
;
}
static
inline
void
*
apc_param_32to64
(
ULONG
func
,
ULONG
context
)
{
if
(
!
func
)
return
ULongToPtr
(
context
);
return
(
void
*
)(
ULONG_PTR
)(((
ULONG64
)
func
<<
32
)
|
context
);
}
static
inline
UNICODE_STRING
*
unicode_str_32to64
(
UNICODE_STRING
*
str
,
const
UNICODE_STRING32
*
str32
)
{
if
(
!
str32
)
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment