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
40185355
Commit
40185355
authored
Mar 18, 2004
by
Raphael Junqueira
Committed by
Alexandre Julliard
Mar 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate code by using Nt* functions for PulseEvent,
ResetEvent and SetEvent.
parent
47323d2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
sync.c
dlls/kernel/sync.c
+17
-23
No files found.
dlls/kernel/sync.c
View file @
40185355
...
...
@@ -43,6 +43,8 @@
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "winreg.h"
#include "winternl.h"
#include "wine/server.h"
#include "wine/unicode.h"
...
...
@@ -498,32 +500,16 @@ HANDLE WINAPI OpenEventW( DWORD access, BOOL inherit, LPCWSTR name )
return
ret
;
}
/***********************************************************************
* EVENT_Operation
*
* Execute an event operation (set,reset,pulse).
*/
static
BOOL
EVENT_Operation
(
HANDLE
handle
,
enum
event_op
op
)
{
BOOL
ret
;
SERVER_START_REQ
(
event_op
)
{
req
->
handle
=
handle
;
req
->
op
=
op
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/***********************************************************************
* PulseEvent (KERNEL32.@)
*/
BOOL
WINAPI
PulseEvent
(
HANDLE
handle
)
{
return
EVENT_Operation
(
handle
,
PULSE_EVENT
);
NTSTATUS
status
;
if
((
status
=
NtPulseEvent
(
handle
,
NULL
)))
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
@@ -533,7 +519,11 @@ BOOL WINAPI PulseEvent( HANDLE handle )
*/
BOOL
WINAPI
SetEvent
(
HANDLE
handle
)
{
return
EVENT_Operation
(
handle
,
SET_EVENT
);
NTSTATUS
status
;
if
((
status
=
NtSetEvent
(
handle
,
NULL
)))
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
@@ -543,7 +533,11 @@ BOOL WINAPI SetEvent( HANDLE handle )
*/
BOOL
WINAPI
ResetEvent
(
HANDLE
handle
)
{
return
EVENT_Operation
(
handle
,
RESET_EVENT
);
NTSTATUS
status
;
if
((
status
=
NtResetEvent
(
handle
,
NULL
)))
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
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