]> git.eshelyaron.com Git - emacs.git/commit
Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)
authorMattias Engdegård <mattiase@acm.org>
Tue, 7 Jan 2020 16:08:25 +0000 (17:08 +0100)
committerMattias Engdegård <mattiase@acm.org>
Tue, 7 Jan 2020 16:57:31 +0000 (17:57 +0100)
commit73fd8a4b535928990f24702cdfaeeeceb6d33d3d
tree56cd425a191c863f87cd4d2b0742464fea8b540a
parentf54b24304decc52defbf12576993d746e02a80ee
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.
configure.ac
src/systhread.c
src/systhread.h
src/thread.c
src/thread.h