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
1992f500
Commit
1992f500
authored
Aug 28, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement the InitOnce functions.
parent
fcb3e603
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
kernel32.spec
dlls/kernel32/kernel32.spec
+5
-2
sync.c
dlls/kernel32/sync.c
+29
-0
sync.c
dlls/kernel32/tests/sync.c
+1
-1
No files found.
dlls/kernel32/kernel32.spec
View file @
1992f500
...
...
@@ -745,12 +745,15 @@
@ stdcall IdnToNameprepUnicode(long wstr long ptr long)
@ stdcall IdnToUnicode(long wstr long ptr long)
@ stdcall InitAtomTable(long)
@ stdcall InitializeSRWLock(ptr)
@ stdcall InitOnceBeginInitialize(ptr long ptr ptr)
@ stdcall InitOnceComplete(ptr long ptr)
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall InitializeCriticalSection(ptr)
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
@ stdcall InitializeCriticalSectionEx(ptr long long)
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall Init
OnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall Init
ializeSRWLock(ptr)
@ stdcall -arch=i386 InterlockedCompareExchange (ptr long long)
@ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr int64 int64) ntdll.RtlInterlockedCompareExchange64
@ stdcall -arch=i386 InterlockedDecrement(ptr)
...
...
dlls/kernel32/sync.c
View file @
1992f500
...
...
@@ -2237,6 +2237,35 @@ 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/kernel32/tests/sync.c
View file @
1992f500
...
...
@@ -1164,7 +1164,7 @@ static void test_initonce(void)
if
(
!
pInitOnceInitialize
||
!
pInitOnceExecuteOnce
)
{
todo_wine
win_skip
(
"one-time initialization API not supported
\n
"
);
win_skip
(
"one-time initialization API not supported
\n
"
);
return
;
}
...
...
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