diff options
author | Robert Pluim <rpluim@gmail.com> | 2019-12-19 17:33:16 +0100 |
---|---|---|
committer | Robert Pluim <rpluim@gmail.com> | 2020-01-06 15:27:26 +0100 |
commit | 9063124b9125ed5e2ad87bbb8bd6224526723a92 (patch) | |
tree | c21c1134698c8d2a131fd387dc3742645c3a1bd2 /src/thread.c | |
parent | 088bfcc2d80eed44864147f3491eff69e4eb5cd8 (diff) | |
download | emacs-9063124b9125ed5e2ad87bbb8bd6224526723a92.tar.gz |
Use pthread_setname_np to set thread name
* configure.ac: Remove check for sys/prctl.h and prctl, check for
pthread_setname_np instead.
* systhread.c: Remove sys/prctl.h include.
(sys_thread_create) [HAVE_PTHREAD_SETNAME_NP]: Use pthread_setname_np
to set the name of the newly created thread (Bug#38632).
* thread.c (Fmake_thread): Use ENCODE_SYSTEM instead of
ENCODE_UTF_8 on the thread name.
Diffstat (limited to 'src/thread.c')
-rw-r--r-- | src/thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c index f81163414bb..f7e39dc4273 100644 --- a/src/thread.c +++ b/src/thread.c @@ -826,7 +826,7 @@ If NAME is given, it must be a string; it names the new thread. */) new_thread->next_thread = all_threads; all_threads = new_thread; - char const *c_name = !NILP (name) ? SSDATA (ENCODE_UTF_8 (name)) : NULL; + char const *c_name = !NILP (name) ? SSDATA (ENCODE_SYSTEM (name)) : NULL; if (c_name) new_thread->thread_name = xstrdup (c_name); else |