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
aa7f8e93
Commit
aa7f8e93
authored
Jun 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move critical section functions to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d33d05ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
66 deletions
+30
-66
kernel32.spec
dlls/kernel32/kernel32.spec
+3
-3
sync.c
dlls/kernel32/sync.c
+0
-61
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+2
-2
sync.c
dlls/kernelbase/sync.c
+25
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
aa7f8e93
...
...
@@ -946,9 +946,9 @@
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable
# @ stub InitializeContext
@ stdcall InitializeCriticalSection(ptr)
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
@ stdcall InitializeCriticalSectionEx(ptr long long)
@ stdcall InitializeCriticalSection(ptr)
ntdll.RtlInitializeCriticalSection
@ stdcall
-import
InitializeCriticalSectionAndSpinCount(ptr long)
@ stdcall
-import
InitializeCriticalSectionEx(ptr long long)
@ stdcall InitializeProcThreadAttributeList(ptr long long ptr)
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock
...
...
dlls/kernel32/sync.c
View file @
aa7f8e93
...
...
@@ -308,67 +308,6 @@ DWORD WINAPI SignalObjectAndWait( HANDLE hObjectToSignal, HANDLE hObjectToWaitOn
}
/***********************************************************************
* InitializeCriticalSection (KERNEL32.@)
*
* Initialise a critical section before use.
*
* PARAMS
* crit [O] Critical section to initialise.
*
* RETURNS
* Nothing. If the function fails an exception is raised.
*/
void
WINAPI
InitializeCriticalSection
(
CRITICAL_SECTION
*
crit
)
{
InitializeCriticalSectionEx
(
crit
,
0
,
0
);
}
/***********************************************************************
* InitializeCriticalSectionAndSpinCount (KERNEL32.@)
*
* Initialise a critical section with a spin count.
*
* PARAMS
* crit [O] Critical section to initialise.
* spincount [I] Number of times to spin upon contention.
*
* RETURNS
* Success: TRUE.
* Failure: Nothing. If the function fails an exception is raised.
*
* NOTES
* spincount is ignored on uni-processor systems.
*/
BOOL
WINAPI
InitializeCriticalSectionAndSpinCount
(
CRITICAL_SECTION
*
crit
,
DWORD
spincount
)
{
return
InitializeCriticalSectionEx
(
crit
,
spincount
,
0
);
}
/***********************************************************************
* InitializeCriticalSectionEx (KERNEL32.@)
*
* Initialise a critical section with a spin count and flags.
*
* PARAMS
* crit [O] Critical section to initialise.
* spincount [I] Number of times to spin upon contention.
* flags [I] CRITICAL_SECTION_ flags from winbase.h.
*
* RETURNS
* Success: TRUE.
* Failure: Nothing. If the function fails an exception is raised.
*
* NOTES
* spincount is ignored on uni-processor systems.
*/
BOOL
WINAPI
InitializeCriticalSectionEx
(
CRITICAL_SECTION
*
crit
,
DWORD
spincount
,
DWORD
flags
)
{
NTSTATUS
ret
=
RtlInitializeCriticalSectionEx
(
crit
,
spincount
,
flags
);
if
(
ret
)
RtlRaiseStatus
(
ret
);
return
!
ret
;
}
/***********************************************************************
* MakeCriticalSectionGlobal (KERNEL32.@)
*/
void
WINAPI
MakeCriticalSectionGlobal
(
CRITICAL_SECTION
*
crit
)
...
...
dlls/kernelbase/kernelbase.spec
View file @
aa7f8e93
...
...
@@ -802,8 +802,8 @@
@ stdcall InitializeConditionVariable(ptr) kernel32.InitializeConditionVariable
# @ stub InitializeContext
@ stdcall InitializeCriticalSection(ptr) kernel32.InitializeCriticalSection
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
kernel32.InitializeCriticalSectionAndSpinCount
@ stdcall InitializeCriticalSectionEx(ptr long long)
kernel32.InitializeCriticalSectionEx
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
@ stdcall InitializeCriticalSectionEx(ptr long long)
# @ stub InitializeEnclave
@ stdcall InitializeProcThreadAttributeList(ptr long long ptr) kernel32.InitializeProcThreadAttributeList
# @ stub InitializeProcessForWsWatch
...
...
dlls/kernelbase/sync.c
View file @
aa7f8e93
...
...
@@ -592,3 +592,28 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteTimerQueueTimer( HANDLE queue, HANDLE timer,
{
return
set_ntstatus
(
RtlDeleteTimer
(
queue
,
timer
,
event
));
}
/***********************************************************************
* Critical sections
***********************************************************************/
/***********************************************************************
* InitializeCriticalSectionAndSpinCount (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
InitializeCriticalSectionAndSpinCount
(
CRITICAL_SECTION
*
crit
,
DWORD
count
)
{
return
!
RtlInitializeCriticalSectionAndSpinCount
(
crit
,
count
);
}
/***********************************************************************
* InitializeCriticalSectionEx (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
InitializeCriticalSectionEx
(
CRITICAL_SECTION
*
crit
,
DWORD
spincount
,
DWORD
flags
)
{
NTSTATUS
ret
=
RtlInitializeCriticalSectionEx
(
crit
,
spincount
,
flags
);
if
(
ret
)
RtlRaiseStatus
(
ret
);
return
!
ret
;
}
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