<div dir="ltr">Hi all,<div><br></div><div>This patch looks to provide a non-#ifdef manner to help choose better debugger-defined thread names when operating on platforms that don't support long thread names. We have code that attempts to pick a smarter short name when a longer thread name is too long to set, but that can fail too when the shortened variant is still too long.</div>
<div><br></div><div>We have cases with the private state threads where there are two variants of the thread name that are not unique enough, even in shortened form, to tell them apart. This change provides a new method, Host::GetMaxThreadNameLength(), implemented for Linux and FreeBSD as returning their implementation-defined limits (16), returns a value inferred for MacOSX (Apple will want to fix this to the real value, it is not published, I inferred the value from the max name length that the thread name retrieval code will support), and std::numeric_limits<uint32_t>::max() for everything else.</div>
<div><br></div><div>Patch by Shawn Best and Todd Fiala</div><div>-- <br><div dir="ltr">-Todd</div>
</div></div>