diff options
| author | Eli Zaretskii | 2015-11-21 19:44:02 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-21 19:44:02 +0200 |
| commit | d696d62fea48096680d6d511a71c4df56d00a51f (patch) | |
| tree | ec9d8707142e396e0de00fffbc5dd9df28800d80 /src/w32term.h | |
| parent | e6b1818f87f559fdd854bdace2801637caffe6ae (diff) | |
| download | emacs-d696d62fea48096680d6d511a71c4df56d00a51f.tar.gz emacs-d696d62fea48096680d6d511a71c4df56d00a51f.zip | |
Simplify recording of main thread's ID on MS-Windows
* src/w32term.c (w32_initialize):
* src/w32console.c (initialize_w32_display):
* src/w32fns.c (globals_of_w32fns): Don't record the main thread
ID independently for each type of session (GUI, TTY, batch).
* src/w32term.c (w32_init_main_thread): New function, records the
main thread's thread ID.
* src/w32term.h: Add prototype for w32_init_main_thread.
* src/emacs.c (main) [WINDOWSNT]: Call w32_init_main_thread.
* src/emacs-module.c [WINDOWSNT]: Rename main_thread_id to
main_thread, for consistency with other threading libraries. All
users changed. Include w32term.h.
(check_main_thread) [WINDOWSNT]: Simplify the test: no need to
make sure the main thread is alive, as we hold a handle on it
opened by w32_init_main_thread.
(module_init) [WINDOWSNT]: Reuse the thread ID recorded by
w32_init_main_thread, instead of calling the requisite APIs once
more.
Diffstat (limited to 'src/w32term.h')
| -rw-r--r-- | src/w32term.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/w32term.h b/src/w32term.h index 467da10c3b7..3377b53608e 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -855,6 +855,8 @@ extern void globals_of_w32menu (void); | |||
| 855 | extern void globals_of_w32fns (void); | 855 | extern void globals_of_w32fns (void); |
| 856 | extern void globals_of_w32notify (void); | 856 | extern void globals_of_w32notify (void); |
| 857 | 857 | ||
| 858 | extern void w32_init_main_thread (void); | ||
| 859 | |||
| 858 | #ifdef CYGWIN | 860 | #ifdef CYGWIN |
| 859 | extern int w32_message_fd; | 861 | extern int w32_message_fd; |
| 860 | #endif /* CYGWIN */ | 862 | #endif /* CYGWIN */ |