mingw-w64/mingw-w64-libraries/winpthreads
Antonin Décimo 04ec40f5bc winpthreads: also use SetThreadDescription to set thread name
Using SetThreadDescription has the advantage that on recent Visual
Studio / Windows, the thread name is always available regardless of
whether a debugger was attached, is also available in crash dumps, and
to other tools.

Quoting MSDN at Set a thread name in C/C++:
https://learn.microsoft.com/en-us/visualstudio/debugger/tips-for-debugging-threads?view=vs-2022&tabs=csharp#set-a-thread-name-in-cc

> There are two ways to set a thread name. The first is via the
> SetThreadDescription function. The second is by throwing a
> particular exception while the Visual Studio debugger is attached to
> the process. Each approach has benefits and caveats. The use of
> SetThreadDescription is supported starting in Windows 10 version
> 1607 or Windows Server 2016.
>
> It's worth noting that both approaches can be used together, if
> desired, since the mechanisms by which they work are independent of
> each other.

Signed-off-by: Antonin Décimo <antonin@tarides.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-10-29 22:39:01 +08:00
..
build-aux Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
include winpthreads: Include pthread_compat.h in sched.h 2024-08-27 09:53:18 +08:00
m4 Run autoreconf -ifv in top directory 2023-11-16 22:44:40 +08:00
src winpthreads: also use SetThreadDescription to set thread name 2024-10-29 22:39:01 +08:00
tests Regenerate autotools scripts with automake 1.16.5 2023-11-17 13:14:02 +08:00
tests_pthread New 2014 log 2014-01-25 02:21:56 +00:00
.gitignore winpthreads: add a .gitignore 2024-04-25 22:14:16 +08:00
aclocal.m4 Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
config.h.in Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
configure Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
configure.ac winpthreads: Silence MSVC copyright message 2023-12-20 15:37:44 +02:00
COPYING Move winpthreads from experimental to trunk 2013-04-14 03:07:39 +00:00
Makefile.am winpthreads: Disable warnings for POSIX function names 2023-12-20 15:37:44 +02:00
Makefile.in winpthreads: Regenerate autotools scripts with automake 1.16.5 2023-12-20 15:37:44 +02:00
README winpthreads: Do not use dllimport when building 3rd-party DLLs (V4) 2022-05-02 20:32:57 +08:00

The Winpthreads Library
-----------------------

This library provides POSIX threading APIs for mingw-w64.

For maximum compatibility, winpthreads headers expose APIs without the
`dllimport` attribute by default. If your program is linked against the
DLL, you may define the `WINPTHREADS_USE_DLLIMPORT` macro to add the
`dllimport` attribute to all APIs, which makes function calls to them a
bit more efficient.