diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-12-11 17:59:55 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-12-11 17:59:55 +0200 |
commit | 997081634a3b6c2359226305db05c818c492a9b2 (patch) | |
tree | cc86cad29bc4a3621c0a48a6a196d87f7b5d13eb /src/thread.h | |
parent | c0cfe9bc143686cd97d431831f47787753a95a42 (diff) | |
download | emacs-997081634a3b6c2359226305db05c818c492a9b2.tar.gz emacs-997081634a3b6c2359226305db05c818c492a9b2.tar.bz2 emacs-997081634a3b6c2359226305db05c818c492a9b2.zip |
Avoid aborts when a thread signals an error
* src/thread.h (struct thread_state): Add members
m_waiting_for_input and m_input_available_clear_time.
(waiting_for_input, input_available_clear_time): New macros.
* src/keyboard.c (waiting_for_input, input_available_clear_time):
Remove; they are now macros that reference the current thread.
(Bug#25171)
* src/w32select.c: Don't include keyboard.h.
* test/src/thread-tests.el (thread-errors): New test.
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index 61740321a5c..f10824f1983 100644 --- a/src/thread.h +++ b/src/thread.h @@ -155,6 +155,15 @@ struct thread_state int m_waiting_for_user_input_p; #define waiting_for_user_input_p (current_thread->m_waiting_for_user_input_p) + /* True while doing kbd input. */ + bool m_waiting_for_input; +#define waiting_for_input (current_thread->m_waiting_for_input) + + /* Address (if not 0) of struct timespec to zero out if a SIGIO interrupt + happens. */ + struct timespec *m_input_available_clear_time; +#define input_available_clear_time (current_thread->m_input_available_clear_time) + /* The OS identifier for this thread. */ sys_thread_t thread_id; |