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
1c2d5172
Commit
1c2d5172
authored
Apr 29, 2019
by
Derek Lesho
Committed by
Alexandre Julliard
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement PsIsSystemThread.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1064e20a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
1 deletion
+18
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+9
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+5
-0
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+2
-0
ntifs.h
include/ddk/ntifs.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
1c2d5172
...
...
@@ -3057,6 +3057,15 @@ HANDLE WINAPI PsGetCurrentThreadId(void)
/***********************************************************************
* PsIsSystemThread (NTOSKRNL.EXE.@)
*/
BOOLEAN
WINAPI
PsIsSystemThread
(
PETHREAD
thread
)
{
return
thread
->
kthread
.
process
==
PsInitialSystemProcess
;
}
/***********************************************************************
* PsGetVersion (NTOSKRNL.EXE.@)
*/
BOOLEAN
WINAPI
PsGetVersion
(
ULONG
*
major
,
ULONG
*
minor
,
ULONG
*
build
,
UNICODE_STRING
*
version
)
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
1c2d5172
...
...
@@ -908,7 +908,7 @@
@ stdcall PsImpersonateClient(ptr ptr long long long)
@ extern PsInitialSystemProcess
@ stub PsIsProcessBeingDebugged
@ st
ub PsIsSystemThread
@ st
dcall PsIsSystemThread(ptr)
@ stub PsIsThreadImpersonating
@ stub PsIsThreadTerminating
@ stub PsJobType
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
1c2d5172
...
...
@@ -39,6 +39,11 @@ struct _KTHREAD
CLIENT_ID
id
;
};
struct
_ETHREAD
{
struct
_KTHREAD
kthread
;
};
void
*
alloc_kernel_object
(
POBJECT_TYPE
type
,
HANDLE
handle
,
SIZE_T
size
,
LONG
ref
)
DECLSPEC_HIDDEN
;
HANDLE
kernel_object_handle
(
void
*
obj
,
unsigned
int
access
)
DECLSPEC_HIDDEN
;
NTSTATUS
kernel_object_from_handle
(
HANDLE
handle
,
POBJECT_TYPE
type
,
void
**
ret
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
1c2d5172
...
...
@@ -337,6 +337,8 @@ static void test_currentprocess(void)
thread
=
PsGetCurrentThread
();
ret
=
wait_single
(
thread
,
0
);
ok
(
ret
==
STATUS_TIMEOUT
,
"got %#x
\n
"
,
ret
);
ok
(
!
PsIsSystemThread
((
PETHREAD
)
KeGetCurrentThread
()),
"unexpected system thread
\n
"
);
}
static
void
sleep
(
void
)
...
...
include/ddk/ntifs.h
View file @
1c2d5172
...
...
@@ -131,6 +131,7 @@ typedef struct _FS_FILTER_CALLBACKS
BOOLEAN
WINAPI
FsRtlIsNameInExpression
(
PUNICODE_STRING
,
PUNICODE_STRING
,
BOOLEAN
,
PWCH
);
NTSTATUS
WINAPI
ObQueryNameString
(
PVOID
,
POBJECT_NAME_INFORMATION
,
ULONG
,
PULONG
);
BOOLEAN
WINAPI
PsIsSystemThread
(
PETHREAD
);
NTSTATUS
WINAPI
PsLookupProcessByProcessId
(
HANDLE
,
PEPROCESS
*
);
NTSTATUS
WINAPI
PsLookupThreadByThreadId
(
HANDLE
,
PETHREAD
*
);
void
WINAPI
PsRevertToSelf
(
void
);
...
...
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