Implement SetThreadName in PAL for Linux. (dotnet/coreclr#27182)
authorPieter-Jan Briers <pieterjan.briers@gmail.com>
Mon, 11 Nov 2019 12:30:18 +0000 (13:30 +0100)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 11 Nov 2019 12:30:18 +0000 (13:30 +0100)
commitb519a7d02bedcdd8c97e75ca3b930658fc21b558
tree787bb9d3ba87e650d6981e9f32673409377ab334
parent26eb02d45dff3ebc84c5591b5ff5dccc8cc328fd
Implement SetThreadName in PAL for Linux. (dotnet/coreclr#27182)

* Implement SetThreadName in PAL for Linux.

This means thread names will now show up in gdb, htop, etc... on Linux.

I did not implement this for any other platforms:
I did not have anything to test them with,
and pthread_setname_np's API varies wildly.

Commit migrated from https://github.com/dotnet/coreclr/commit/5f5f9606a6eef78256536f667c2df7b2495a8c3d
src/coreclr/src/dlls/mscordac/mscordac_unixexports.src
src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/inc/rt/palrt.h
src/coreclr/src/pal/src/include/pal/thread.hpp
src/coreclr/src/pal/src/thread/thread.cpp
src/coreclr/src/utilcode/winfix.cpp
src/coreclr/src/vm/comsynchronizable.cpp
src/coreclr/src/vm/threads.cpp
src/coreclr/src/vm/win32threadpool.cpp