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
72540c93
Commit
72540c93
authored
Jul 16, 2020
by
Derek Lesho
Committed by
Alexandre Julliard
Aug 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement KeReadStateEvent.
Signed-off-by:
Derek Lesho
<
dlesho@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
65df36c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
sync.c
dlls/ntoskrnl.exe/sync.c
+22
-0
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+11
-0
wdm.h
include/ddk/wdm.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
72540c93
...
...
@@ -599,7 +599,7 @@
@ stdcall KeQueryTickCount(ptr)
@ stdcall KeQueryTimeIncrement()
@ stub KeRaiseUserException
@ st
ub KeReadStateEvent
@ st
dcall KeReadStateEvent(ptr)
@ stub KeReadStateMutant
@ stub KeReadStateMutex
@ stub KeReadStateQueue
...
...
dlls/ntoskrnl.exe/sync.c
View file @
72540c93
...
...
@@ -312,6 +312,28 @@ void WINAPI KeClearEvent( PRKEVENT event )
}
/***********************************************************************
* KeReadStateEvent (NTOSKRNL.EXE.@)
*/
LONG
WINAPI
KeReadStateEvent
(
PRKEVENT
event
)
{
HANDLE
handle
;
TRACE
(
"event %p.
\n
"
,
event
);
if
(
event
->
Header
.
WaitListHead
.
Blink
==
INVALID_HANDLE_VALUE
)
{
if
(
!
(
ObOpenObjectByPointer
(
event
,
OBJ_KERNEL_HANDLE
,
NULL
,
EVENT_QUERY_STATE
,
NULL
,
KernelMode
,
&
handle
)))
{
EVENT_BASIC_INFORMATION
event_info
;
if
(
!
(
NtQueryEvent
(
handle
,
EventBasicInformation
,
&
event_info
,
sizeof
(
event_info
),
NULL
)))
event
->
Header
.
SignalState
=
event_info
.
EventState
;
NtClose
(
handle
);
}
}
return
event
->
Header
.
SignalState
;
}
/***********************************************************************
* KeInitializeSemaphore (NTOSKRNL.EXE.@)
*/
void
WINAPI
KeInitializeSemaphore
(
PRKSEMAPHORE
semaphore
,
LONG
count
,
LONG
limit
)
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
72540c93
...
...
@@ -467,8 +467,14 @@ static void test_sync(void)
ret
=
wait_single
(
&
manual_event
,
0
);
ok
(
ret
==
STATUS_TIMEOUT
,
"got %#x
\n
"
,
ret
);
ret
=
KeReadStateEvent
(
&
manual_event
);
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
KeSetEvent
(
&
manual_event
,
0
,
FALSE
);
ret
=
KeReadStateEvent
(
&
manual_event
);
ok
(
ret
==
1
,
"got %d
\n
"
,
ret
);
ret
=
wait_single
(
&
manual_event
,
0
);
ok
(
ret
==
0
,
"got %#x
\n
"
,
ret
);
...
...
@@ -561,9 +567,14 @@ static void test_sync(void)
ret
=
ObReferenceObjectByHandle
(
handle
,
SYNCHRONIZE
,
*
pExEventObjectType
,
KernelMode
,
(
void
**
)
&
event
,
NULL
);
ok
(
!
ret
,
"ObReferenceObjectByHandle failed: %#x
\n
"
,
ret
);
ret
=
wait_single
(
event
,
0
);
ok
(
ret
==
0
,
"got %#x
\n
"
,
ret
);
ret
=
KeReadStateEvent
(
event
);
ok
(
ret
==
1
,
"got %d
\n
"
,
ret
);
KeResetEvent
(
event
);
ret
=
KeReadStateEvent
(
event
);
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
ret
=
wait_single
(
event
,
0
);
ok
(
ret
==
STATUS_TIMEOUT
,
"got %#x
\n
"
,
ret
);
ret
=
wait_single_handle
(
handle
,
0
);
...
...
include/ddk/wdm.h
View file @
72540c93
...
...
@@ -1759,6 +1759,7 @@ KAFFINITY WINAPI KeQueryActiveProcessors(void);
void
WINAPI
KeQuerySystemTime
(
LARGE_INTEGER
*
);
void
WINAPI
KeQueryTickCount
(
LARGE_INTEGER
*
);
ULONG
WINAPI
KeQueryTimeIncrement
(
void
);
LONG
WINAPI
KeReadStateEvent
(
PRKEVENT
);
void
FASTCALL
KeReleaseInStackQueuedSpinLockFromDpcLevel
(
KLOCK_QUEUE_HANDLE
*
);
LONG
WINAPI
KeReleaseMutex
(
PRKMUTEX
,
BOOLEAN
);
LONG
WINAPI
KeReleaseSemaphore
(
PRKSEMAPHORE
,
KPRIORITY
,
LONG
,
BOOLEAN
);
...
...
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