diff options
| author | Mattias EngdegÄrd | 2020-01-07 17:08:25 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-01-07 17:57:31 +0100 |
| commit | 73fd8a4b535928990f24702cdfaeeeceb6d33d3d (patch) | |
| tree | 56cd425a191c863f87cd4d2b0742464fea8b540a /src/systhread.h | |
| parent | f54b24304decc52defbf12576993d746e02a80ee (diff) | |
| download | emacs-73fd8a4b535928990f24702cdfaeeeceb6d33d3d.tar.gz emacs-73fd8a4b535928990f24702cdfaeeeceb6d33d3d.zip | |
Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)
pthread_setname_np takes only a single argument on BSD and macOS,
and affects the current thread only.
* configure.ac: Add check for single-argument pthread_setname_np
* src/systhread.c (sys_thread_set_name): New (w32 and pthread versions).
(sys_thread_create): Remove name argument and name-setting.
(w32_beginthread_wrapper): Remove name-setting.
* src/systhread.h (sys_thread_create, sys_thread_set_name):
Update prototypes.
* src/thread.c (run_thread): Call sys_thread_set_name.
(Fmake_thread): Adapt call to sys_thread_create.
* src/thread.h (struct thread_state): Adjust comment.
Diffstat (limited to 'src/systhread.h')
| -rw-r--r-- | src/systhread.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systhread.h b/src/systhread.h index 5368acfb52c..005388fd5a4 100644 --- a/src/systhread.h +++ b/src/systhread.h | |||
| @@ -112,10 +112,11 @@ extern sys_thread_t sys_thread_self (void) | |||
| 112 | extern bool sys_thread_equal (sys_thread_t, sys_thread_t) | 112 | extern bool sys_thread_equal (sys_thread_t, sys_thread_t) |
| 113 | ATTRIBUTE_WARN_UNUSED_RESULT; | 113 | ATTRIBUTE_WARN_UNUSED_RESULT; |
| 114 | 114 | ||
| 115 | extern bool sys_thread_create (sys_thread_t *, const char *, | 115 | extern bool sys_thread_create (sys_thread_t *, thread_creation_function *, |
| 116 | thread_creation_function *, void *) | 116 | void *) |
| 117 | ATTRIBUTE_WARN_UNUSED_RESULT; | 117 | ATTRIBUTE_WARN_UNUSED_RESULT; |
| 118 | 118 | ||
| 119 | extern void sys_thread_yield (void); | 119 | extern void sys_thread_yield (void); |
| 120 | extern void sys_thread_set_name (const char *); | ||
| 120 | 121 | ||
| 121 | #endif /* SYSTHREAD_H */ | 122 | #endif /* SYSTHREAD_H */ |