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
ee0fd30e
Commit
ee0fd30e
authored
Jun 17, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Jun 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use +threadname channel for SetThreadDescription().
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
parent
8a61b7c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
thread.c
dlls/ntdll/unix/thread.c
+9
-0
No files found.
dlls/ntdll/unix/thread.c
View file @
ee0fd30e
...
...
@@ -70,6 +70,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
thread
);
WINE_DECLARE_DEBUG_CHANNEL
(
seh
);
WINE_DECLARE_DEBUG_CHANNEL
(
threadname
);
static
int
nb_threads
=
1
;
...
...
@@ -2232,11 +2233,19 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadNameInformation
:
{
const
THREAD_NAME_INFORMATION
*
info
=
data
;
THREAD_BASIC_INFORMATION
tbi
;
if
(
length
!=
sizeof
(
*
info
))
return
STATUS_INFO_LENGTH_MISMATCH
;
if
(
!
info
)
return
STATUS_ACCESS_VIOLATION
;
if
(
info
->
ThreadName
.
Length
&&
!
info
->
ThreadName
.
Buffer
)
return
STATUS_ACCESS_VIOLATION
;
if
(
handle
==
GetCurrentThread
())
WARN_
(
threadname
)(
"Thread renamed to %s
\n
"
,
debugstr_us
(
&
info
->
ThreadName
)
);
else
if
(
!
NtQueryInformationThread
(
handle
,
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
))
WARN_
(
threadname
)(
"Thread ID %04x renamed to %s
\n
"
,
HandleToULong
(
tbi
.
ClientId
.
UniqueThread
),
debugstr_us
(
&
info
->
ThreadName
)
);
else
WARN_
(
threadname
)(
"Thread handle %p renamed to %s
\n
"
,
handle
,
debugstr_us
(
&
info
->
ThreadName
)
);
SERVER_START_REQ
(
set_thread_info
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
...
...
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