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
fe4f1382
Commit
fe4f1382
authored
Feb 26, 2024
by
Brendan Shanks
Committed by
Alexandre Julliard
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add native thread renaming for FreeBSD.
parent
a542400d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
thread.c
dlls/ntdll/unix/thread.c
+33
-0
No files found.
dlls/ntdll/unix/thread.c
View file @
fe4f1382
...
...
@@ -62,6 +62,9 @@
#ifdef __APPLE__
#include <mach/mach.h>
#endif
#ifdef __FreeBSD__
#include <sys/thr.h>
#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
...
...
@@ -1935,6 +1938,36 @@ static void set_native_thread_name( HANDLE handle, const UNICODE_STRING *name )
len
=
ntdll_wcstoumbs
(
name
->
Buffer
,
name
->
Length
/
sizeof
(
WCHAR
),
nameA
,
sizeof
(
nameA
)
-
1
,
FALSE
);
nameA
[
len
]
=
'\0'
;
pthread_setname_np
(
nameA
);
#elif defined(__FreeBSD__)
unsigned
int
status
;
char
nameA
[
64
];
int
unix_pid
,
unix_tid
,
len
;
SERVER_START_REQ
(
get_thread_times
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
status
=
wine_server_call
(
req
);
if
(
status
==
STATUS_SUCCESS
)
{
unix_pid
=
reply
->
unix_pid
;
unix_tid
=
reply
->
unix_tid
;
}
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_SUCCESS
||
unix_pid
==
-
1
||
unix_tid
==
-
1
)
return
;
if
(
unix_pid
!=
getpid
())
{
static
int
once
;
if
(
!
once
++
)
FIXME
(
"cross-process native thread naming not supported
\n
"
);
return
;
}
len
=
ntdll_wcstoumbs
(
name
->
Buffer
,
name
->
Length
/
sizeof
(
WCHAR
),
nameA
,
sizeof
(
nameA
),
FALSE
);
nameA
[
len
]
=
'\0'
;
thr_set_name
(
unix_tid
,
nameA
);
#else
static
int
once
;
if
(
!
once
++
)
FIXME
(
"not implemented on this platform
\n
"
);
...
...
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