Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c683e7e5
Commit
c683e7e5
authored
Sep 08, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move interlocked functions to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76581572
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
40 deletions
+101
-40
kernel32.spec
dlls/kernel32/kernel32.spec
+3
-3
sync.c
dlls/kernel32/sync.c
+0
-29
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+8
-8
sync.c
dlls/kernelbase/sync.c
+90
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
c683e7e5
...
...
@@ -940,9 +940,9 @@
@ stdcall IdnToNameprepUnicode(long wstr long ptr long)
@ stdcall IdnToUnicode(long wstr long ptr long)
@ stdcall InitAtomTable(long)
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
@ stdcall InitOnceComplete(ptr long ptr)
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
kernelbase.InitOnceBeginInitialize
@ stdcall InitOnceComplete(ptr long ptr)
kernelbase.InitOnceComplete
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
kernelbase.InitOnceExecuteOnce
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable
# @ stub InitializeContext
...
...
dlls/kernel32/sync.c
View file @
c683e7e5
...
...
@@ -1071,35 +1071,6 @@ BOOL WINAPI QueryMemoryResourceNotification(HANDLE handle, PBOOL state)
return
FALSE
;
}
/***********************************************************************
* InitOnceBeginInitialize (KERNEL32.@)
*/
BOOL
WINAPI
InitOnceBeginInitialize
(
INIT_ONCE
*
once
,
DWORD
flags
,
BOOL
*
pending
,
void
**
context
)
{
NTSTATUS
status
=
RtlRunOnceBeginInitialize
(
once
,
flags
,
context
);
if
(
status
>=
0
)
*
pending
=
(
status
==
STATUS_PENDING
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
status
>=
0
;
}
/***********************************************************************
* InitOnceComplete (KERNEL32.@)
*/
BOOL
WINAPI
InitOnceComplete
(
INIT_ONCE
*
once
,
DWORD
flags
,
void
*
context
)
{
NTSTATUS
status
=
RtlRunOnceComplete
(
once
,
flags
,
context
);
if
(
status
!=
STATUS_SUCCESS
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
/***********************************************************************
* InitOnceExecuteOnce (KERNEL32.@)
*/
BOOL
WINAPI
InitOnceExecuteOnce
(
INIT_ONCE
*
once
,
PINIT_ONCE_FN
func
,
void
*
param
,
void
**
context
)
{
return
!
RtlRunOnceExecuteOnce
(
once
,
(
PRTL_RUN_ONCE_INIT_FN
)
func
,
param
,
context
);
}
#ifdef __i386__
/***********************************************************************
...
...
dlls/kernelbase/kernelbase.spec
View file @
c683e7e5
...
...
@@ -794,9 +794,9 @@
@ stdcall ImpersonateNamedPipeClient(long)
@ stdcall ImpersonateSelf(long)
# @ stub IncrementPackageStatusVersion
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
kernel32.InitOnceBeginInitialize
@ stdcall InitOnceComplete(ptr long ptr)
kernel32.InitOnceComplete
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
kernel32.InitOnceExecuteOnce
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
@ stdcall InitOnceComplete(ptr long ptr)
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall InitializeAcl(ptr long long)
@ stdcall InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable
...
...
@@ -813,13 +813,13 @@
@ stdcall InitializeSid(ptr ptr long)
# @ stub InitializeSynchronizationBarrier
# @ stub InstallELAMCertificateInfo
@ stdcall -arch=i386 InterlockedCompareExchange(ptr long long)
kernel32.InterlockedCompareExchange
@ stdcall -arch=i386 InterlockedCompareExchange(ptr long long)
@ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr int64 int64) ntdll.RtlInterlockedCompareExchange64
@ stdcall -arch=i386 InterlockedDecrement(ptr)
kernel32.InterlockedDecrement
@ stdcall -arch=i386 InterlockedExchange(ptr long)
kernel32.InterlockedExchange
@ stdcall -arch=i386 InterlockedExchangeAdd(ptr long )
kernel32.InterlockedExchangeAdd
@ stdcall -arch=i386 InterlockedDecrement(ptr)
@ stdcall -arch=i386 InterlockedExchange(ptr long)
@ stdcall -arch=i386 InterlockedExchangeAdd(ptr long )
@ stdcall InterlockedFlushSList(ptr) ntdll.RtlInterlockedFlushSList
@ stdcall -arch=i386 InterlockedIncrement(ptr)
kernel32.InterlockedIncrement
@ stdcall -arch=i386 InterlockedIncrement(ptr)
@ stdcall InterlockedPopEntrySList(ptr) ntdll.RtlInterlockedPopEntrySList
@ stdcall InterlockedPushEntrySList(ptr ptr) ntdll.RtlInterlockedPushEntrySList
@ stdcall -fastcall InterlockedPushListSList(ptr ptr ptr long) ntdll.RtlInterlockedPushListSList
...
...
dlls/kernelbase/sync.c
View file @
c683e7e5
...
...
@@ -1383,3 +1383,93 @@ BOOL WINAPI DECLSPEC_HOTPATCH WaitNamedPipeW( LPCWSTR name, DWORD timeout )
NtClose
(
pipe_dev
);
return
set_ntstatus
(
status
);
}
/***********************************************************************
* Interlocked functions
***********************************************************************/
/***********************************************************************
* InitOnceBeginInitialize (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
InitOnceBeginInitialize
(
INIT_ONCE
*
once
,
DWORD
flags
,
BOOL
*
pending
,
void
**
context
)
{
NTSTATUS
status
=
RtlRunOnceBeginInitialize
(
once
,
flags
,
context
);
if
(
status
>=
0
)
*
pending
=
(
status
==
STATUS_PENDING
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
status
>=
0
;
}
/***********************************************************************
* InitOnceComplete (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
InitOnceComplete
(
INIT_ONCE
*
once
,
DWORD
flags
,
void
*
context
)
{
return
set_ntstatus
(
RtlRunOnceComplete
(
once
,
flags
,
context
));
}
/***********************************************************************
* InitOnceExecuteOnce (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
InitOnceExecuteOnce
(
INIT_ONCE
*
once
,
PINIT_ONCE_FN
func
,
void
*
param
,
void
**
context
)
{
return
!
RtlRunOnceExecuteOnce
(
once
,
(
PRTL_RUN_ONCE_INIT_FN
)
func
,
param
,
context
);
}
#ifdef __i386__
/***********************************************************************
* InterlockedCompareExchange (kernelbase.@)
*/
__ASM_STDCALL_FUNC
(
InterlockedCompareExchange
,
12
,
"movl 12(%esp),%eax
\n\t
"
"movl 8(%esp),%ecx
\n\t
"
"movl 4(%esp),%edx
\n\t
"
"lock; cmpxchgl %ecx,(%edx)
\n\t
"
"ret $12"
)
/***********************************************************************
* InterlockedExchange (kernelbase.@)
*/
__ASM_STDCALL_FUNC
(
InterlockedExchange
,
8
,
"movl 8(%esp),%eax
\n\t
"
"movl 4(%esp),%edx
\n\t
"
"lock; xchgl %eax,(%edx)
\n\t
"
"ret $8"
)
/***********************************************************************
* InterlockedExchangeAdd (kernelbase.@)
*/
__ASM_STDCALL_FUNC
(
InterlockedExchangeAdd
,
8
,
"movl 8(%esp),%eax
\n\t
"
"movl 4(%esp),%edx
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
"ret $8"
)
/***********************************************************************
* InterlockedIncrement (kernelbase.@)
*/
__ASM_STDCALL_FUNC
(
InterlockedIncrement
,
4
,
"movl 4(%esp),%edx
\n\t
"
"movl $1,%eax
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
"incl %eax
\n\t
"
"ret $4"
)
/***********************************************************************
* InterlockedDecrement (kernelbase.@)
*/
__ASM_STDCALL_FUNC
(
InterlockedDecrement
,
4
,
"movl 4(%esp),%edx
\n\t
"
"movl $-1,%eax
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
"decl %eax
\n\t
"
"ret $4"
)
#endif
/* __i386__ */
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