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
65dd060a
Commit
65dd060a
authored
Dec 02, 2021
by
Brendan Shanks
Committed by
Alexandre Julliard
Dec 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Rename ThreadDescription to ThreadNameInformation.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3867d253
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
thread.c
dlls/kernel32/tests/thread.c
+11
-11
thread.c
dlls/kernelbase/thread.c
+3
-3
thread.c
dlls/ntdll/unix/thread.c
+2
-2
process.c
dlls/wow64/process.c
+2
-2
winternl.h
include/winternl.h
+1
-1
No files found.
dlls/kernel32/tests/thread.c
View file @
65dd060a
...
@@ -2378,7 +2378,7 @@ static void test_thread_description(void)
...
@@ -2378,7 +2378,7 @@ static void test_thread_description(void)
LocalFree
(
ptr
);
LocalFree
(
ptr
);
len
=
0
;
len
=
0
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
NULL
,
0
,
&
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
NULL
,
0
,
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
len
==
sizeof
(
*
thread_desc
),
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len
==
sizeof
(
*
thread_desc
),
"Unexpected structure length %u.
\n
"
,
len
);
...
@@ -2386,7 +2386,7 @@ static void test_thread_description(void)
...
@@ -2386,7 +2386,7 @@ static void test_thread_description(void)
thread_desc
->
Description
.
Length
=
1
;
thread_desc
->
Description
.
Length
=
1
;
thread_desc
->
Description
.
MaximumLength
=
0
;
thread_desc
->
Description
.
MaximumLength
=
0
;
thread_desc
->
Description
.
Buffer
=
(
WCHAR
*
)
thread_desc
;
thread_desc
->
Description
.
Buffer
=
(
WCHAR
*
)
thread_desc
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
thread_desc
,
len
,
&
len2
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
thread_desc
,
len
,
&
len2
);
ok
(
!
status
,
"Failed to get thread info, status %#x.
\n
"
,
status
);
ok
(
!
status
,
"Failed to get thread info, status %#x.
\n
"
,
status
);
ok
(
len2
==
sizeof
(
*
thread_desc
),
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len2
==
sizeof
(
*
thread_desc
),
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
!
thread_desc
->
Description
.
Length
,
"Unexpected description length %#x.
\n
"
,
thread_desc
->
Description
.
Length
);
ok
(
!
thread_desc
->
Description
.
Length
,
"Unexpected description length %#x.
\n
"
,
thread_desc
->
Description
.
Length
);
...
@@ -2406,12 +2406,12 @@ static void test_thread_description(void)
...
@@ -2406,12 +2406,12 @@ static void test_thread_description(void)
LocalFree
(
ptr
);
LocalFree
(
ptr
);
len
=
0
;
len
=
0
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
NULL
,
0
,
&
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
NULL
,
0
,
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Failed to get thread info, status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Failed to get thread info, status %#x.
\n
"
,
status
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
len
=
0
;
len
=
0
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
buff
,
sizeof
(
buff
),
&
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
buff
,
sizeof
(
buff
),
&
len
);
ok
(
!
status
,
"Failed to get thread info.
\n
"
);
ok
(
!
status
,
"Failed to get thread info.
\n
"
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
...
@@ -2423,11 +2423,11 @@ static void test_thread_description(void)
...
@@ -2423,11 +2423,11 @@ static void test_thread_description(void)
/* Partial results. */
/* Partial results. */
len
=
0
;
len
=
0
;
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
NULL
,
0
,
&
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
NULL
,
0
,
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
buff
,
len
-
sizeof
(
WCHAR
),
&
len
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
buff
,
len
-
sizeof
(
WCHAR
),
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
ok
(
len
==
sizeof
(
*
thread_desc
)
+
desc_len
,
"Unexpected structure length %u.
\n
"
,
len
);
...
@@ -2435,7 +2435,7 @@ static void test_thread_description(void)
...
@@ -2435,7 +2435,7 @@ static void test_thread_description(void)
thread_desc
->
Description
.
Length
=
thread_desc
->
Description
.
MaximumLength
=
8
;
thread_desc
->
Description
.
Length
=
thread_desc
->
Description
.
MaximumLength
=
8
;
lstrcpyW
((
WCHAR
*
)(
thread_desc
+
1
),
L"desc"
);
lstrcpyW
((
WCHAR
*
)(
thread_desc
+
1
),
L"desc"
);
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
ok
(
status
==
STATUS_SUCCESS
,
"Failed to set thread description, status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"Failed to set thread description, status %#x.
\n
"
,
status
);
ptr
=
NULL
;
ptr
=
NULL
;
...
@@ -2444,14 +2444,14 @@ static void test_thread_description(void)
...
@@ -2444,14 +2444,14 @@ static void test_thread_description(void)
ok
(
!
lstrcmpW
(
ptr
,
L"desc"
),
"Unexpected description %s.
\n
"
,
wine_dbgstr_w
(
ptr
));
ok
(
!
lstrcmpW
(
ptr
,
L"desc"
),
"Unexpected description %s.
\n
"
,
wine_dbgstr_w
(
ptr
));
LocalFree
(
ptr
);
LocalFree
(
ptr
);
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
thread_desc
,
sizeof
(
*
thread_desc
)
-
1
);
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
thread_desc
,
sizeof
(
*
thread_desc
)
-
1
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"Unexpected status %#x.
\n
"
,
status
);
status
=
NtSetInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
NULL
,
sizeof
(
*
thread_desc
));
status
=
NtSetInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
NULL
,
sizeof
(
*
thread_desc
));
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"Unexpected status %#x.
\n
"
,
status
);
thread_desc
->
Description
.
Buffer
=
NULL
;
thread_desc
->
Description
.
Buffer
=
NULL
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"Unexpected status %#x.
\n
"
,
status
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"Unexpected status %#x.
\n
"
,
status
);
hr
=
pSetThreadDescription
(
GetCurrentThread
(),
NULL
);
hr
=
pSetThreadDescription
(
GetCurrentThread
(),
NULL
);
...
@@ -2468,7 +2468,7 @@ static void test_thread_description(void)
...
@@ -2468,7 +2468,7 @@ static void test_thread_description(void)
ok
(
hr
==
HRESULT_FROM_NT
(
STATUS_SUCCESS
),
"Failed to set thread description, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_NT
(
STATUS_SUCCESS
),
"Failed to set thread description, hr %#x.
\n
"
,
hr
);
memset
(
thread_desc
,
0
,
sizeof
(
*
thread_desc
));
memset
(
thread_desc
,
0
,
sizeof
(
*
thread_desc
));
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
Descrip
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
Thread
NameInforma
tion
,
thread_desc
,
sizeof
(
*
thread_desc
));
ok
(
!
status
,
"Failed to set thread description, status %#x.
\n
"
,
status
);
ok
(
!
status
,
"Failed to set thread description, status %#x.
\n
"
,
status
);
ptr
=
NULL
;
ptr
=
NULL
;
...
...
dlls/kernelbase/thread.c
View file @
65dd060a
...
@@ -430,7 +430,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH SetThreadDescription( HANDLE thread, PCWSTR des
...
@@ -430,7 +430,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH SetThreadDescription( HANDLE thread, PCWSTR des
info
.
Description
.
Length
=
info
.
Description
.
MaximumLength
=
length
;
info
.
Description
.
Length
=
info
.
Description
.
MaximumLength
=
length
;
info
.
Description
.
Buffer
=
(
WCHAR
*
)
description
;
info
.
Description
.
Buffer
=
(
WCHAR
*
)
description
;
return
HRESULT_FROM_NT
(
NtSetInformationThread
(
thread
,
Thread
Descrip
tion
,
&
info
,
sizeof
(
info
)
));
return
HRESULT_FROM_NT
(
NtSetInformationThread
(
thread
,
Thread
NameInforma
tion
,
&
info
,
sizeof
(
info
)
));
}
}
/***********************************************************************
/***********************************************************************
...
@@ -447,14 +447,14 @@ HRESULT WINAPI DECLSPEC_HOTPATCH GetThreadDescription( HANDLE thread, WCHAR **de
...
@@ -447,14 +447,14 @@ HRESULT WINAPI DECLSPEC_HOTPATCH GetThreadDescription( HANDLE thread, WCHAR **de
*
description
=
NULL
;
*
description
=
NULL
;
length
=
0
;
length
=
0
;
status
=
NtQueryInformationThread
(
thread
,
Thread
Descrip
tion
,
NULL
,
0
,
&
length
);
status
=
NtQueryInformationThread
(
thread
,
Thread
NameInforma
tion
,
NULL
,
0
,
&
length
);
if
(
status
!=
STATUS_BUFFER_TOO_SMALL
)
if
(
status
!=
STATUS_BUFFER_TOO_SMALL
)
return
HRESULT_FROM_NT
(
status
);
return
HRESULT_FROM_NT
(
status
);
if
(
!
(
info
=
heap_alloc
(
length
)))
if
(
!
(
info
=
heap_alloc
(
length
)))
return
HRESULT_FROM_NT
(
STATUS_NO_MEMORY
);
return
HRESULT_FROM_NT
(
STATUS_NO_MEMORY
);
status
=
NtQueryInformationThread
(
thread
,
Thread
Descrip
tion
,
info
,
length
,
&
length
);
status
=
NtQueryInformationThread
(
thread
,
Thread
NameInforma
tion
,
info
,
length
,
&
length
);
if
(
!
status
)
if
(
!
status
)
{
{
if
(
!
(
*
description
=
LocalAlloc
(
0
,
info
->
Description
.
Length
+
sizeof
(
WCHAR
))))
if
(
!
(
*
description
=
LocalAlloc
(
0
,
info
->
Description
.
Length
+
sizeof
(
WCHAR
))))
...
...
dlls/ntdll/unix/thread.c
View file @
65dd060a
...
@@ -2035,7 +2035,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
...
@@ -2035,7 +2035,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_END_REQ
;
SERVER_END_REQ
;
return
status
;
return
status
;
case
Thread
Descrip
tion
:
case
Thread
NameInforma
tion
:
{
{
THREAD_DESCRIPTION_INFORMATION
*
info
=
data
;
THREAD_DESCRIPTION_INFORMATION
*
info
=
data
;
data_size_t
len
,
desc_len
=
0
;
data_size_t
len
,
desc_len
=
0
;
...
@@ -2228,7 +2228,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
...
@@ -2228,7 +2228,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
return
status
;
return
status
;
}
}
case
Thread
Descrip
tion
:
case
Thread
NameInforma
tion
:
{
{
const
THREAD_DESCRIPTION_INFORMATION
*
info
=
data
;
const
THREAD_DESCRIPTION_INFORMATION
*
info
=
data
;
...
...
dlls/wow64/process.c
View file @
65dd060a
...
@@ -934,7 +934,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args )
...
@@ -934,7 +934,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args )
return
status
;
return
status
;
}
}
case
Thread
Descrip
tion
:
/* THREAD_DESCRIPTION_INFORMATION */
case
Thread
NameInforma
tion
:
/* THREAD_DESCRIPTION_INFORMATION */
{
{
THREAD_DESCRIPTION_INFORMATION
*
info
;
THREAD_DESCRIPTION_INFORMATION
*
info
;
THREAD_DESCRIPTION_INFORMATION32
*
info32
=
ptr
;
THREAD_DESCRIPTION_INFORMATION32
*
info32
=
ptr
;
...
@@ -1190,7 +1190,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args )
...
@@ -1190,7 +1190,7 @@ NTSTATUS WINAPI wow64_NtSetInformationThread( UINT *args )
}
}
else
return
STATUS_INVALID_PARAMETER
;
else
return
STATUS_INVALID_PARAMETER
;
case
Thread
Descrip
tion
:
/* THREAD_DESCRIPTION_INFORMATION */
case
Thread
NameInforma
tion
:
/* THREAD_DESCRIPTION_INFORMATION */
if
(
len
==
sizeof
(
THREAD_DESCRIPTION_INFORMATION32
))
if
(
len
==
sizeof
(
THREAD_DESCRIPTION_INFORMATION32
))
{
{
THREAD_DESCRIPTION_INFORMATION32
*
info32
=
ptr
;
THREAD_DESCRIPTION_INFORMATION32
*
info32
=
ptr
;
...
...
include/winternl.h
View file @
65dd060a
...
@@ -1870,7 +1870,7 @@ typedef enum _THREADINFOCLASS {
...
@@ -1870,7 +1870,7 @@ typedef enum _THREADINFOCLASS {
ThreadCounterProfiling
,
ThreadCounterProfiling
,
ThreadIdealProcessorEx
,
ThreadIdealProcessorEx
,
ThreadSuspendCount
=
35
,
ThreadSuspendCount
=
35
,
Thread
Descrip
tion
=
38
,
Thread
NameInforma
tion
=
38
,
MaxThreadInfoClass
MaxThreadInfoClass
}
THREADINFOCLASS
;
}
THREADINFOCLASS
;
...
...
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