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
bc2164e0
Commit
bc2164e0
authored
Jul 16, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use syscall thunks for semaphore functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d1f83537
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
58 deletions
+9
-58
ntdll.spec
dlls/ntdll/ntdll.spec
+8
-8
sync.c
dlls/ntdll/sync.c
+0
-38
loader.c
dlls/ntdll/unix/loader.c
+0
-4
unixlib.h
dlls/ntdll/unixlib.h
+1
-8
No files found.
dlls/ntdll/ntdll.spec
View file @
bc2164e0
...
...
@@ -180,7 +180,7 @@
# @ stub NtCreateProcessEx
@ stub NtCreateProfile
@ stdcall NtCreateSection(ptr long ptr ptr long long long)
@ stdcall NtCreateSemaphore(ptr long ptr long long)
@ stdcall
-syscall
NtCreateSemaphore(ptr long ptr long long)
@ stdcall NtCreateSymbolicLinkObject(ptr long ptr ptr)
@ stub NtCreateThread
@ stdcall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr)
...
...
@@ -267,7 +267,7 @@
@ stdcall NtOpenProcessToken(long long ptr)
@ stdcall NtOpenProcessTokenEx(long long long ptr)
@ stdcall NtOpenSection(ptr long ptr)
@ stdcall NtOpenSemaphore(ptr long ptr)
@ stdcall
-syscall
NtOpenSemaphore(ptr long ptr)
@ stdcall NtOpenSymbolicLinkObject (ptr long ptr)
@ stdcall NtOpenThread(ptr long ptr ptr)
@ stdcall NtOpenThreadToken(long long long ptr)
...
...
@@ -312,7 +312,7 @@
# @ stub NtQueryQuotaInformationFile
@ stdcall NtQuerySection(long long ptr long ptr)
@ stdcall NtQuerySecurityObject(long long ptr long ptr)
@ stdcall NtQuerySemaphore (long long ptr long ptr)
@ stdcall
-syscall
NtQuerySemaphore (long long ptr long ptr)
@ stdcall NtQuerySymbolicLinkObject(long ptr ptr)
@ stdcall NtQuerySystemEnvironmentValue(ptr ptr long ptr)
@ stdcall NtQuerySystemEnvironmentValueEx(ptr ptr ptr ptr ptr)
...
...
@@ -336,7 +336,7 @@
@ stdcall NtReleaseKeyedEvent(long ptr long ptr)
@ stdcall NtReleaseMutant(long ptr)
@ stub NtReleaseProcessMutant
@ stdcall NtReleaseSemaphore(long long ptr)
@ stdcall
-syscall
NtReleaseSemaphore(long long ptr)
@ stdcall NtRemoveIoCompletion(ptr ptr ptr ptr ptr)
@ stdcall NtRemoveIoCompletionEx(ptr ptr long ptr ptr long)
# @ stub NtRemoveProcessDebug
...
...
@@ -1168,7 +1168,7 @@
# @ stub ZwCreateProcessEx
@ stub ZwCreateProfile
@ stdcall -private ZwCreateSection(ptr long ptr ptr long long long) NtCreateSection
@ stdcall -private ZwCreateSemaphore(ptr long ptr long long) NtCreateSemaphore
@ stdcall -private
-syscall
ZwCreateSemaphore(ptr long ptr long long) NtCreateSemaphore
@ stdcall -private ZwCreateSymbolicLinkObject(ptr long ptr ptr) NtCreateSymbolicLinkObject
@ stub ZwCreateThread
@ stdcall -private ZwCreateTimer(ptr long ptr long) NtCreateTimer
...
...
@@ -1251,7 +1251,7 @@
@ stdcall -private ZwOpenProcessToken(long long ptr) NtOpenProcessToken
@ stdcall -private ZwOpenProcessTokenEx(long long long ptr) NtOpenProcessTokenEx
@ stdcall -private ZwOpenSection(ptr long ptr) NtOpenSection
@ stdcall -private ZwOpenSemaphore(ptr long ptr) NtOpenSemaphore
@ stdcall -private
-syscall
ZwOpenSemaphore(ptr long ptr) NtOpenSemaphore
@ stdcall -private ZwOpenSymbolicLinkObject (ptr long ptr) NtOpenSymbolicLinkObject
@ stdcall -private ZwOpenThread(ptr long ptr ptr) NtOpenThread
@ stdcall -private ZwOpenThreadToken(long long long ptr) NtOpenThreadToken
...
...
@@ -1296,7 +1296,7 @@
# @ stub ZwQueryQuotaInformationFile
@ stdcall -private ZwQuerySection(long long ptr long ptr) NtQuerySection
@ stdcall -private ZwQuerySecurityObject(long long ptr long ptr) NtQuerySecurityObject
@ stdcall -private ZwQuerySemaphore(long long ptr long ptr) NtQuerySemaphore
@ stdcall -private
-syscall
ZwQuerySemaphore(long long ptr long ptr) NtQuerySemaphore
@ stdcall -private ZwQuerySymbolicLinkObject(long ptr ptr) NtQuerySymbolicLinkObject
@ stdcall -private ZwQuerySystemEnvironmentValue(ptr ptr long ptr) NtQuerySystemEnvironmentValue
@ stdcall -private ZwQuerySystemEnvironmentValueEx(ptr ptr ptr ptr ptr) NtQuerySystemEnvironmentValueEx
...
...
@@ -1320,7 +1320,7 @@
@ stdcall -private ZwReleaseKeyedEvent(long ptr long ptr) NtReleaseKeyedEvent
@ stdcall -private ZwReleaseMutant(long ptr) NtReleaseMutant
@ stub ZwReleaseProcessMutant
@ stdcall -private ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore
@ stdcall -private
-syscall
ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore
@ stdcall -private ZwRemoveIoCompletion(ptr ptr ptr ptr ptr) NtRemoveIoCompletion
@ stdcall -private ZwRemoveIoCompletionEx(ptr ptr long ptr ptr long) NtRemoveIoCompletionEx
# @ stub ZwRemoveProcessDebug
...
...
dlls/ntdll/sync.c
View file @
bc2164e0
...
...
@@ -136,44 +136,6 @@ NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
}
/*
* Semaphores
*/
/******************************************************************************
* NtCreateSemaphore (NTDLL.@)
*/
NTSTATUS
WINAPI
NtCreateSemaphore
(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
LONG
initial
,
LONG
max
)
{
return
unix_funcs
->
NtCreateSemaphore
(
handle
,
access
,
attr
,
initial
,
max
);
}
/******************************************************************************
* NtOpenSemaphore (NTDLL.@)
*/
NTSTATUS
WINAPI
NtOpenSemaphore
(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
)
{
return
unix_funcs
->
NtOpenSemaphore
(
handle
,
access
,
attr
);
}
/******************************************************************************
* NtQuerySemaphore (NTDLL.@)
*/
NTSTATUS
WINAPI
NtQuerySemaphore
(
HANDLE
handle
,
SEMAPHORE_INFORMATION_CLASS
class
,
void
*
info
,
ULONG
len
,
ULONG
*
ret_len
)
{
return
unix_funcs
->
NtQuerySemaphore
(
handle
,
class
,
info
,
len
,
ret_len
);
}
/******************************************************************************
* NtReleaseSemaphore (NTDLL.@)
*/
NTSTATUS
WINAPI
NtReleaseSemaphore
(
HANDLE
handle
,
ULONG
count
,
PULONG
previous
)
{
return
unix_funcs
->
NtReleaseSemaphore
(
handle
,
count
,
previous
);
}
/*
* Events
*/
...
...
dlls/ntdll/unix/loader.c
View file @
bc2164e0
...
...
@@ -1375,7 +1375,6 @@ static struct unix_funcs unix_funcs =
NtCreateMutant
,
NtCreateNamedPipeFile
,
NtCreateSection
,
NtCreateSemaphore
,
NtCreateThreadEx
,
NtCreateTimer
,
NtCreateUserProcess
,
...
...
@@ -1404,7 +1403,6 @@ static struct unix_funcs unix_funcs =
NtOpenMutant
,
NtOpenProcess
,
NtOpenSection
,
NtOpenSemaphore
,
NtOpenThread
,
NtOpenTimer
,
NtPowerInformation
,
...
...
@@ -1423,7 +1421,6 @@ static struct unix_funcs unix_funcs =
NtQueryObject
,
NtQueryPerformanceCounter
,
NtQuerySection
,
NtQuerySemaphore
,
NtQuerySystemInformation
,
NtQuerySystemInformationEx
,
NtQuerySystemTime
,
...
...
@@ -1437,7 +1434,6 @@ static struct unix_funcs unix_funcs =
NtReadVirtualMemory
,
NtReleaseKeyedEvent
,
NtReleaseMutant
,
NtReleaseSemaphore
,
NtRemoveIoCompletion
,
NtRemoveIoCompletionEx
,
NtResetEvent
,
...
...
dlls/ntdll/unixlib.h
View file @
bc2164e0
...
...
@@ -28,7 +28,7 @@ struct msghdr;
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 7
4
#define NTDLL_UNIXLIB_VERSION 7
5
struct
unix_funcs
{
...
...
@@ -65,8 +65,6 @@ struct unix_funcs
NTSTATUS
(
WINAPI
*
NtCreateSection
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
const
LARGE_INTEGER
*
size
,
ULONG
protect
,
ULONG
sec_flags
,
HANDLE
file
);
NTSTATUS
(
WINAPI
*
NtCreateSemaphore
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
LONG
initial
,
LONG
max
);
NTSTATUS
(
WINAPI
*
NtCreateThreadEx
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
,
HANDLE
process
,
PRTL_THREAD_START_ROUTINE
start
,
void
*
param
,
ULONG
flags
,
SIZE_T
zero_bits
,
SIZE_T
stack_commit
,
...
...
@@ -128,8 +126,6 @@ struct unix_funcs
const
OBJECT_ATTRIBUTES
*
attr
,
const
CLIENT_ID
*
id
);
NTSTATUS
(
WINAPI
*
NtOpenSection
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
);
NTSTATUS
(
WINAPI
*
NtOpenSemaphore
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
);
NTSTATUS
(
WINAPI
*
NtOpenThread
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
const
CLIENT_ID
*
id
);
NTSTATUS
(
WINAPI
*
NtOpenTimer
)(
HANDLE
*
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
);
...
...
@@ -166,8 +162,6 @@ struct unix_funcs
NTSTATUS
(
WINAPI
*
NtQueryPerformanceCounter
)(
LARGE_INTEGER
*
counter
,
LARGE_INTEGER
*
frequency
);
NTSTATUS
(
WINAPI
*
NtQuerySection
)(
HANDLE
handle
,
SECTION_INFORMATION_CLASS
class
,
void
*
ptr
,
SIZE_T
size
,
SIZE_T
*
ret_size
);
NTSTATUS
(
WINAPI
*
NtQuerySemaphore
)(
HANDLE
handle
,
SEMAPHORE_INFORMATION_CLASS
class
,
void
*
info
,
ULONG
len
,
ULONG
*
ret_len
);
NTSTATUS
(
WINAPI
*
NtQuerySystemInformation
)(
SYSTEM_INFORMATION_CLASS
class
,
void
*
info
,
ULONG
size
,
ULONG
*
ret_size
);
NTSTATUS
(
WINAPI
*
NtQuerySystemInformationEx
)(
SYSTEM_INFORMATION_CLASS
class
,
...
...
@@ -197,7 +191,6 @@ struct unix_funcs
NTSTATUS
(
WINAPI
*
NtReleaseKeyedEvent
)(
HANDLE
handle
,
const
void
*
key
,
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
);
NTSTATUS
(
WINAPI
*
NtReleaseMutant
)(
HANDLE
handle
,
LONG
*
prev_count
);
NTSTATUS
(
WINAPI
*
NtReleaseSemaphore
)(
HANDLE
handle
,
ULONG
count
,
ULONG
*
previous
);
NTSTATUS
(
WINAPI
*
NtRemoveIoCompletion
)(
HANDLE
handle
,
ULONG_PTR
*
key
,
ULONG_PTR
*
value
,
IO_STATUS_BLOCK
*
io
,
LARGE_INTEGER
*
timeout
);
NTSTATUS
(
WINAPI
*
NtRemoveIoCompletionEx
)(
HANDLE
handle
,
FILE_IO_COMPLETION_INFORMATION
*
info
,
...
...
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