diff options
-rw-r--r-- | lib/libthr/thread/thr_init.c | 3 | ||||
-rw-r--r-- | lib/libthr/thread/thr_list.c | 5 | ||||
-rw-r--r-- | lib/libthr/thread/thr_private.h | 1 |
3 files changed, 2 insertions, 7 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index a7ff4fc..33f3ee6 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -384,7 +384,7 @@ init_main_thread(struct pthread *thread) thread->magic = THR_MAGIC; thread->cancelflags = PTHREAD_CANCEL_ENABLE | PTHREAD_CANCEL_DEFERRED; - thread->name = strdup("initial thread"); + thr_set_name(thread->tid, "initial thread"); /* Default the priority of the initial thread: */ thread->base_priority = THR_DEFAULT_PRIORITY; @@ -414,7 +414,6 @@ init_private(void) _thr_umtx_init(&_thr_event_lock); _thr_spinlock_init(); _thr_list_init(); - _thr_timer_init(); /* * Avoid reinitializing some things if they don't need to be, diff --git a/lib/libthr/thread/thr_list.c b/lib/libthr/thread/thr_list.c index ede90ce..072dc22 100644 --- a/lib/libthr/thread/thr_list.c +++ b/lib/libthr/thread/thr_list.c @@ -177,10 +177,7 @@ void _thr_free(struct pthread *curthread, struct pthread *thread) { DBG_MSG("Freeing thread %p\n", thread); - if (thread->name) { - free(thread->name); - thread->name = NULL; - } + /* * Always free tcb, as we only know it is part of RTLD TLS * block, but don't know its detail and can not assume how diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index bf10228..c922b46 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -338,7 +338,6 @@ struct pthread { */ #define THR_MAGIC ((u_int32_t) 0xd09ba115) u_int32_t magic; - char *name; /* * Lock for accesses to this thread structure. |