Subject: bug#38632: 27.0.50; Emacs process name is changed permanently upon creating a named thread

From: Eli Zaretskii <[email-masked]>
Date: Tue, 07 Jan 2020 17:45:36 +0200

> From: Mattias Engdegård <[email-masked]>
> Date: Mon, 6 Jan 2020 22:58:25 +0100
> Cc: Eli Zaretskii <[email-masked]>, Robert Pluim <[email-masked]>
> 
> Here is a quick-and-dirty patch that repairs the macOS/BSD builds. Not tested on anything else.

Thanks.  This is fine for the emacs-27 branch, but it needs some minor
cleanup:

> -static thread_creation_function *thread_start_address;

This line cannot be deleted, as it will cause systhread.c fail to
compile on MS-Windows.

And this comment on thread.h:

  /* Thread's name in the locale encoding.  Actually used only on
     WINDOWSNT.  */
  char *thread_name;

is no longer accurate, so it needs to be updated to reflect the
modified code.