]> git.eshelyaron.com Git - emacs.git/commit
Support setting OS names of threads on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Fri, 20 Dec 2019 18:59:07 +0000 (20:59 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 20 Dec 2019 18:59:07 +0000 (20:59 +0200)
commit0e19b5d757d88eedd23709a4ea40aa1512a1ff21
tree5ab479668337f979c29e41e9254fa609d463391c
parent85a60da92d4db5c87ecfa152501d246425550fc3
Support setting OS names of threads on MS-Windows

* src/w32fns.c (setup_w32_kbdhook): Don't initialize
is_debugger_present here...
(globals_of_w32fns): ...initialize it here.  Also initialize
the new global variable set_thread_description.
* src/systhread.c: [WINDOWSNT] Include mbctype.h
(w32_set_thread_name): New function.
(MS_VC_EXCEPTION): New macro.
(THREADNAME_INFO, IsDebuggerPresent_Proc)
(SetThreadDescription_Proc): New typedefs.
(w32_beginthread_wrapper): Call w32_set_thread_name to set the
name of the new thread.
* src/thread.h (struct thread_state): New member thread_name.
* src/thread.c (Fmake_thread): Set the thread_name field of
the new thread object.
(run_thread): Free the thread_name member after the thread
exits.
src/systhread.c
src/thread.c
src/thread.h
src/w32fns.c