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
9585990a
Commit
9585990a
authored
Jun 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move condition variable functions to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
628d4450
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
40 deletions
+42
-40
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
sync.c
dlls/kernel32/sync.c
+0
-36
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+2
-2
sync.c
dlls/kernelbase/sync.c
+38
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
9585990a
...
...
@@ -1482,8 +1482,8 @@
@ stdcall SignalObjectAndWait(long long long long)
@ stdcall SizeofResource(long long)
@ stdcall Sleep(long)
@ stdcall SleepConditionVariableCS(ptr ptr long)
@ stdcall SleepConditionVariableSRW(ptr ptr long long)
@ stdcall
-import
SleepConditionVariableCS(ptr ptr long)
@ stdcall
-import
SleepConditionVariableSRW(ptr ptr long long)
@ stdcall SleepEx(long long)
# @ stub SortCloseHandle
# @ stub SortGetHandle
...
...
dlls/kernel32/sync.c
View file @
9585990a
...
...
@@ -1875,39 +1875,3 @@ __ASM_STDCALL_FUNC(InterlockedDecrement, 4,
"ret $4"
)
#endif
/* __i386__ */
/***********************************************************************
* SleepConditionVariableCS (KERNEL32.@)
*/
BOOL
WINAPI
SleepConditionVariableCS
(
CONDITION_VARIABLE
*
variable
,
CRITICAL_SECTION
*
crit
,
DWORD
timeout
)
{
NTSTATUS
status
;
LARGE_INTEGER
time
;
status
=
RtlSleepConditionVariableCS
(
variable
,
crit
,
get_nt_timeout
(
&
time
,
timeout
)
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* SleepConditionVariableSRW (KERNEL32.@)
*/
BOOL
WINAPI
SleepConditionVariableSRW
(
RTL_CONDITION_VARIABLE
*
variable
,
RTL_SRWLOCK
*
lock
,
DWORD
timeout
,
ULONG
flags
)
{
NTSTATUS
status
;
LARGE_INTEGER
time
;
status
=
RtlSleepConditionVariableSRW
(
variable
,
lock
,
get_nt_timeout
(
&
time
,
timeout
),
flags
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
dlls/kernelbase/kernelbase.spec
View file @
9585990a
...
...
@@ -1512,8 +1512,8 @@
@ stdcall SignalObjectAndWait(long long long long) kernel32.SignalObjectAndWait
@ stdcall SizeofResource(long long) kernel32.SizeofResource
@ stdcall Sleep(long) kernel32.Sleep
@ stdcall SleepConditionVariableCS(ptr ptr long)
kernel32.SleepConditionVariableCS
@ stdcall SleepConditionVariableSRW(ptr ptr long long)
kernel32.SleepConditionVariableSRW
@ stdcall SleepConditionVariableCS(ptr ptr long)
@ stdcall SleepConditionVariableSRW(ptr ptr long long)
@ stdcall SleepEx(long long) kernel32.SleepEx
@ stub SpecialMBToWC
@ stub StartThreadpoolIo
...
...
dlls/kernelbase/sync.c
View file @
9585990a
...
...
@@ -45,6 +45,14 @@ static inline BOOL is_version_nt(void)
return
!
(
GetVersion
()
&
0x80000000
);
}
/* helper for kernel32->ntdll timeout format conversion */
static
inline
LARGE_INTEGER
*
get_nt_timeout
(
LARGE_INTEGER
*
time
,
DWORD
timeout
)
{
if
(
timeout
==
INFINITE
)
return
NULL
;
time
->
QuadPart
=
(
ULONGLONG
)
timeout
*
-
10000
;
return
time
;
}
/***********************************************************************
* BaseGetNamedObjectDirectory (kernelbase.@)
...
...
@@ -719,3 +727,33 @@ HANDLE WINAPI DECLSPEC_HOTPATCH OpenFileMappingW( DWORD access, BOOL inherit, LP
}
return
ret
;
}
/***********************************************************************
* Condition variables
***********************************************************************/
/***********************************************************************
* SleepConditionVariableCS (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SleepConditionVariableCS
(
CONDITION_VARIABLE
*
variable
,
CRITICAL_SECTION
*
crit
,
DWORD
timeout
)
{
LARGE_INTEGER
time
;
return
set_ntstatus
(
RtlSleepConditionVariableCS
(
variable
,
crit
,
get_nt_timeout
(
&
time
,
timeout
)));
}
/***********************************************************************
* SleepConditionVariableSRW (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SleepConditionVariableSRW
(
RTL_CONDITION_VARIABLE
*
variable
,
RTL_SRWLOCK
*
lock
,
DWORD
timeout
,
ULONG
flags
)
{
LARGE_INTEGER
time
;
return
set_ntstatus
(
RtlSleepConditionVariableSRW
(
variable
,
lock
,
get_nt_timeout
(
&
time
,
timeout
),
flags
));
}
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