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
e1a4fbe7
Commit
e1a4fbe7
authored
Jul 23, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Add thunks for the semaphore syscalls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b093118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
sync.c
dlls/wow64/sync.c
+70
-0
syscall.h
dlls/wow64/syscall.h
+4
-0
No files found.
dlls/wow64/sync.c
View file @
e1a4fbe7
...
...
@@ -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
)
...
...
dlls/wow64/syscall.h
View file @
e1a4fbe7
...
...
@@ -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 ) \
...
...
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