aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
authorTom Tromey2012-08-27 10:12:29 -0600
committerTom Tromey2012-08-27 10:12:29 -0600
commit587dd92ea0814eafe4064be69d6d9e0fa8dbac1b (patch)
tree73722612c54a436d906be9d870f9bb1adc4df52c /src/thread.c
parent599d4a99403a8ea40144ca94dbf9f99fb1a038ee (diff)
downloademacs-587dd92ea0814eafe4064be69d6d9e0fa8dbac1b.tar.gz
emacs-587dd92ea0814eafe4064be69d6d9e0fa8dbac1b.zip
cannot thread-join the current thread
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 01d2fd0d6eb..551f3de10e4 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -852,6 +852,9 @@ It is an error for a thread to try to join itself. */)
852 CHECK_THREAD (thread); 852 CHECK_THREAD (thread);
853 tstate = XTHREAD (thread); 853 tstate = XTHREAD (thread);
854 854
855 if (tstate == current_thread)
856 error ("cannot join current thread");
857
855 if (tstate->m_specpdl != NULL) 858 if (tstate->m_specpdl != NULL)
856 flush_stack_call_func (thread_join_callback, tstate); 859 flush_stack_call_func (thread_join_callback, tstate);
857 860