aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c
index f7e39dc4273..c7fe0614269 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -725,6 +725,9 @@ run_thread (void *state)
725 self->m_stack_bottom = self->stack_top = (char *) &stack_pos; 725 self->m_stack_bottom = self->stack_top = (char *) &stack_pos;
726 self->thread_id = sys_thread_self (); 726 self->thread_id = sys_thread_self ();
727 727
728 if (self->thread_name)
729 sys_thread_set_name (self->thread_name);
730
728 acquire_global_lock (self); 731 acquire_global_lock (self);
729 732
730 /* Put a dummy catcher at top-level so that handlerlist is never NULL. 733 /* Put a dummy catcher at top-level so that handlerlist is never NULL.
@@ -832,7 +835,7 @@ If NAME is given, it must be a string; it names the new thread. */)
832 else 835 else
833 new_thread->thread_name = NULL; 836 new_thread->thread_name = NULL;
834 sys_thread_t thr; 837 sys_thread_t thr;
835 if (! sys_thread_create (&thr, c_name, run_thread, new_thread)) 838 if (! sys_thread_create (&thr, run_thread, new_thread))
836 { 839 {
837 /* Restore the previous situation. */ 840 /* Restore the previous situation. */
838 all_threads = all_threads->next_thread; 841 all_threads = all_threads->next_thread;