summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h
index 7fce8674f0e..cb2133d72d4 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -158,6 +158,13 @@ struct thread_state
bool m_waiting_for_input;
#define waiting_for_input (current_thread->m_waiting_for_input)
+ /* For longjmp to where kbd input is being done. This is per-thread
+ so that if more than one thread calls read_char, they don't
+ clobber each other's getcjmp, which will cause
+ quit_throw_to_read_char crash due to using a wrong stack. */
+ sys_jmp_buf m_getcjmp;
+#define getcjmp (current_thread->m_getcjmp)
+
/* The OS identifier for this thread. */
sys_thread_t thread_id;