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
b9627b99
Commit
b9627b99
authored
Jan 27, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Mar 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Add ExGetPreviousMode and test.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54378
parent
f3e1d897
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletion
+9
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+6
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+1
-0
wdm.h
include/ddk/wdm.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
b9627b99
...
...
@@ -4566,6 +4566,12 @@ NTSTATUS WINAPI KdEnableDebugger(void)
return
STATUS_DEBUGGER_INACTIVE
;
}
KPROCESSOR_MODE
WINAPI
ExGetPreviousMode
(
void
)
{
TRACE
(
"
\n
"
);
return
PsIsSystemThread
((
PETHREAD
)
KeGetCurrentThread
())
?
KernelMode
:
UserMode
;
}
#ifdef __x86_64__
void
WINAPI
KfRaiseIrql
(
KIRQL
new
,
KIRQL
*
old
)
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
b9627b99
...
...
@@ -154,7 +154,7 @@
@ stub ExGetCurrentProcessorCounts
@ stub ExGetCurrentProcessorCpuUsage
@ stdcall ExGetExclusiveWaiterCount(ptr)
@ st
ub ExGetPreviousMode
@ st
dcall ExGetPreviousMode()
@ stdcall ExGetSharedWaiterCount(ptr)
@ stdcall ExInitializeNPagedLookasideList(ptr ptr ptr long long long long)
@ stdcall ExInitializePagedLookasideList(ptr ptr ptr long long long long)
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
b9627b99
...
...
@@ -454,6 +454,7 @@ static void test_current_thread(BOOL is_system)
ok
(
PsGetThreadId
((
PETHREAD
)
KeGetCurrentThread
())
==
PsGetCurrentThreadId
(),
"thread IDs don't match
\n
"
);
ok
(
PsIsSystemThread
((
PETHREAD
)
KeGetCurrentThread
())
==
is_system
,
"unexpected system thread
\n
"
);
ok
(
ExGetPreviousMode
()
==
is_system
?
KernelMode
:
UserMode
,
"previous mode is not correct
\n
"
);
if
(
!
is_system
)
{
ok
(
create_caller_thread
==
KeGetCurrentThread
(),
"thread is not create caller thread
\n
"
);
...
...
include/ddk/wdm.h
View file @
b9627b99
...
...
@@ -1683,6 +1683,7 @@ void WINAPI ExDeleteNPagedLookasideList(PNPAGED_LOOKASIDE_LIST);
void
WINAPI
ExDeletePagedLookasideList
(
PPAGED_LOOKASIDE_LIST
);
NTSTATUS
WINAPI
ExDeleteResourceLite
(
ERESOURCE
*
);
ULONG
WINAPI
ExGetExclusiveWaiterCount
(
ERESOURCE
*
);
KPROCESSOR_MODE
WINAPI
ExGetPreviousMode
(
void
);
ULONG
WINAPI
ExGetSharedWaiterCount
(
ERESOURCE
*
);
void
WINAPI
ExInitializeNPagedLookasideList
(
PNPAGED_LOOKASIDE_LIST
,
PALLOCATE_FUNCTION
,
PFREE_FUNCTION
,
ULONG
,
SIZE_T
,
ULONG
,
USHORT
);
void
WINAPI
ExInitializePagedLookasideList
(
PPAGED_LOOKASIDE_LIST
,
PALLOCATE_FUNCTION
,
PFREE_FUNCTION
,
ULONG
,
SIZE_T
,
ULONG
,
USHORT
);
...
...
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