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
c57fd07d
Commit
c57fd07d
authored
Oct 07, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move the 16-bit synchronization functions to kernel16.c.
parent
fe2c157f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
103 deletions
+106
-103
kernel16.c
dlls/kernel32/kernel16.c
+103
-0
krnl386.exe.spec
dlls/kernel32/krnl386.exe.spec
+3
-3
sync.c
dlls/kernel32/sync.c
+0
-100
No files found.
dlls/kernel32/kernel16.c
View file @
c57fd07d
...
...
@@ -215,6 +215,109 @@ INT16 WINAPI UnicodeToAnsi16( LPCWSTR src, LPSTR dst, INT16 codepage )
}
/***********************************************************************
* VWin32_EventCreate (KERNEL.442)
*/
HANDLE
WINAPI
VWin32_EventCreate
(
VOID
)
{
HANDLE
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
0
,
NULL
);
return
ConvertToGlobalHandle
(
hEvent
);
}
/***********************************************************************
* VWin32_EventDestroy (KERNEL.443)
*/
VOID
WINAPI
VWin32_EventDestroy
(
HANDLE
event
)
{
CloseHandle
(
event
);
}
/***********************************************************************
* VWin32_EventWait (KERNEL.450)
*/
VOID
WINAPI
VWin32_EventWait
(
HANDLE
event
)
{
DWORD
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
WaitForSingleObject
(
event
,
INFINITE
);
RestoreThunkLock
(
mutex_count
);
}
/***********************************************************************
* VWin32_EventSet (KERNEL.451)
* KERNEL_479 (KERNEL.479)
*/
VOID
WINAPI
VWin32_EventSet
(
HANDLE
event
)
{
SetEvent
(
event
);
}
/***********************************************************************
* CreateW32Event (KERNEL.457)
*/
HANDLE
WINAPI
CreateW32Event
(
BOOL
manual_reset
,
BOOL
initial_state
)
{
return
CreateEventW
(
NULL
,
manual_reset
,
initial_state
,
NULL
);
}
/***********************************************************************
* SetW32Event (KERNEL.458)
*/
BOOL
WINAPI
SetW32Event
(
HANDLE
handle
)
{
return
SetEvent
(
handle
);
}
/***********************************************************************
* ResetW32Event (KERNEL.459)
*/
BOOL
WINAPI
ResetW32Event
(
HANDLE
handle
)
{
return
ResetEvent
(
handle
);
}
/***********************************************************************
* WaitForSingleObject (KERNEL.460)
*/
DWORD
WINAPI
WaitForSingleObject16
(
HANDLE
handle
,
DWORD
timeout
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForSingleObject
(
handle
,
timeout
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* WaitForMultipleObjects (KERNEL.461)
*/
DWORD
WINAPI
WaitForMultipleObjects16
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOL
wait_all
,
DWORD
timeout
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForMultipleObjectsEx
(
count
,
handles
,
wait_all
,
timeout
,
FALSE
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* WaitForMultipleObjectsEx (KERNEL.495)
*/
DWORD
WINAPI
WaitForMultipleObjectsEx16
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOL
wait_all
,
DWORD
timeout
,
BOOL
alertable
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForMultipleObjectsEx
(
count
,
handles
,
wait_all
,
timeout
,
alertable
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* EnableDos (KERNEL.41)
* DisableDos (KERNEL.42)
* GetLastDiskChange (KERNEL.98)
...
...
dlls/kernel32/krnl386.exe.spec
View file @
c57fd07d
...
...
@@ -359,9 +359,9 @@
454 equate __FLATCS 0 # initialized by BUILTIN_Init()
455 equate __FLATDS 0 # initialized by BUILTIN_Init()
456 pascal DefResourceHandler(word word word) NE_DefResourceHandler
457 pascal CreateW32Event(long long)
WIN16_Create
Event
458 pascal SetW32Event(long) SetEvent
459 pascal ResetW32Event(long) ResetEvent
457 pascal CreateW32Event(long long)
CreateW32
Event
458 pascal SetW32Event(long) Set
W32
Event
459 pascal ResetW32Event(long) Reset
W32
Event
460 pascal WaitForSingleObject(long long) WaitForSingleObject16
461 pascal WaitForMultipleObjects(long ptr long long) WaitForMultipleObjects16
462 pascal GetCurrentThreadId() GetCurrentThreadId
...
...
dlls/kernel32/sync.c
View file @
c57fd07d
...
...
@@ -43,7 +43,6 @@
#include "ddk/wdm.h"
#include "wine/unicode.h"
#include "wine/winbase16.h"
#include "kernel_private.h"
#include "wine/debug.h"
...
...
@@ -202,47 +201,6 @@ DWORD WINAPI WaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
/***********************************************************************
* WaitForSingleObject (KERNEL.460)
*/
DWORD
WINAPI
WaitForSingleObject16
(
HANDLE
handle
,
DWORD
timeout
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForSingleObject
(
handle
,
timeout
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* WaitForMultipleObjects (KERNEL.461)
*/
DWORD
WINAPI
WaitForMultipleObjects16
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOL
wait_all
,
DWORD
timeout
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForMultipleObjectsEx
(
count
,
handles
,
wait_all
,
timeout
,
FALSE
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* WaitForMultipleObjectsEx (KERNEL.495)
*/
DWORD
WINAPI
WaitForMultipleObjectsEx16
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOL
wait_all
,
DWORD
timeout
,
BOOL
alertable
)
{
DWORD
retval
,
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
retval
=
WaitForMultipleObjectsEx
(
count
,
handles
,
wait_all
,
timeout
,
alertable
);
RestoreThunkLock
(
mutex_count
);
return
retval
;
}
/***********************************************************************
* RegisterWaitForSingleObject (KERNEL32.@)
*/
BOOL
WINAPI
RegisterWaitForSingleObject
(
PHANDLE
phNewWaitObject
,
HANDLE
hObject
,
...
...
@@ -542,15 +500,6 @@ HANDLE WINAPI CreateEventExW( SECURITY_ATTRIBUTES *sa, LPCWSTR name, DWORD flags
/***********************************************************************
* CreateW32Event (KERNEL.457)
*/
HANDLE
WINAPI
WIN16_CreateEvent
(
BOOL
manual_reset
,
BOOL
initial_state
)
{
return
CreateEventW
(
NULL
,
manual_reset
,
initial_state
,
NULL
);
}
/***********************************************************************
* OpenEventA (KERNEL32.@)
*/
HANDLE
WINAPI
OpenEventA
(
DWORD
access
,
BOOL
inherit
,
LPCSTR
name
)
...
...
@@ -616,7 +565,6 @@ BOOL WINAPI PulseEvent( HANDLE handle )
/***********************************************************************
* SetW32Event (KERNEL.458)
* SetEvent (KERNEL32.@)
*/
BOOL
WINAPI
SetEvent
(
HANDLE
handle
)
...
...
@@ -630,7 +578,6 @@ BOOL WINAPI SetEvent( HANDLE handle )
/***********************************************************************
* ResetW32Event (KERNEL.459)
* ResetEvent (KERNEL32.@)
*/
BOOL
WINAPI
ResetEvent
(
HANDLE
handle
)
...
...
@@ -644,53 +591,6 @@ BOOL WINAPI ResetEvent( HANDLE handle )
/***********************************************************************
* NOTE: The Win95 VWin32_Event routines given below are really low-level
* routines implemented directly by VWin32. The user-mode libraries
* implement Win32 synchronisation routines on top of these low-level
* primitives. We do it the other way around here :-)
*/
/***********************************************************************
* VWin32_EventCreate (KERNEL.442)
*/
HANDLE
WINAPI
VWin32_EventCreate
(
VOID
)
{
HANDLE
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
0
,
NULL
);
return
ConvertToGlobalHandle
(
hEvent
);
}
/***********************************************************************
* VWin32_EventDestroy (KERNEL.443)
*/
VOID
WINAPI
VWin32_EventDestroy
(
HANDLE
event
)
{
CloseHandle
(
event
);
}
/***********************************************************************
* VWin32_EventWait (KERNEL.450)
*/
VOID
WINAPI
VWin32_EventWait
(
HANDLE
event
)
{
DWORD
mutex_count
;
ReleaseThunkLock
(
&
mutex_count
);
WaitForSingleObject
(
event
,
INFINITE
);
RestoreThunkLock
(
mutex_count
);
}
/***********************************************************************
* VWin32_EventSet (KERNEL.451)
* KERNEL_479 (KERNEL.479)
*/
VOID
WINAPI
VWin32_EventSet
(
HANDLE
event
)
{
SetEvent
(
event
);
}
/***********************************************************************
* CreateMutexA (KERNEL32.@)
*/
HANDLE
WINAPI
CreateMutexA
(
SECURITY_ATTRIBUTES
*
sa
,
BOOL
owner
,
LPCSTR
name
)
...
...
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