diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-02-08 21:25:55 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-02-08 21:25:55 +0100 |
commit | 883af6aa527c4d0b43adc99c19e1cbb53153a7a0 (patch) | |
tree | ab4170eae8919f11855e3b8a69f13457b4fa601d /proc/msg.c | |
parent | 7ac18bc84ae7c5a5f2f255b6d5337eb085bb86cd (diff) |
Add names to threads
Diffstat (limited to 'proc/msg.c')
-rw-r--r-- | proc/msg.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -35,11 +35,13 @@ check_message_return (struct proc *p, void *availpaddr) } } -/* Register ourselves with statup. */ +/* Register ourselves with startup. */ static void * -tickle_statup (void *statupport) +tickle_startup (void *startupport) { - startup_essential_task ((mach_port_t) (uintptr_t) statupport, + pthread_setname_np (pthread_self (), "startup"); + + startup_essential_task ((mach_port_t) (uintptr_t) startupport, mach_task_self (), MACH_PORT_NULL, "proc", _hurd_host_priv); return NULL; @@ -70,7 +72,7 @@ S_proc_setmsgport (struct proc *p, the essential task RPC; spawn a thread to do it. */ pthread_t thread; error_t err; - err = pthread_create (&thread, NULL, tickle_statup, + err = pthread_create (&thread, NULL, tickle_startup, (void*) (uintptr_t) msgport); if (!err) pthread_detach (thread); |