diff options
| author | Robert Pluim | 2019-12-19 17:33:16 +0100 |
|---|---|---|
| committer | Robert Pluim | 2020-01-06 15:27:26 +0100 |
| commit | 9063124b9125ed5e2ad87bbb8bd6224526723a92 (patch) | |
| tree | c21c1134698c8d2a131fd387dc3742645c3a1bd2 /src/thread.c | |
| parent | 088bfcc2d80eed44864147f3491eff69e4eb5cd8 (diff) | |
| download | emacs-9063124b9125ed5e2ad87bbb8bd6224526723a92.tar.gz emacs-9063124b9125ed5e2ad87bbb8bd6224526723a92.zip | |
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. */) | |||
| 826 | new_thread->next_thread = all_threads; | 826 | new_thread->next_thread = all_threads; |
| 827 | all_threads = new_thread; | 827 | all_threads = new_thread; |
| 828 | 828 | ||
| 829 | char const *c_name = !NILP (name) ? SSDATA (ENCODE_UTF_8 (name)) : NULL; | 829 | char const *c_name = !NILP (name) ? SSDATA (ENCODE_SYSTEM (name)) : NULL; |
| 830 | if (c_name) | 830 | if (c_name) |
| 831 | new_thread->thread_name = xstrdup (c_name); | 831 | new_thread->thread_name = xstrdup (c_name); |
| 832 | else | 832 | else |