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 /term/hurdio.c | |
parent | 7ac18bc84ae7c5a5f2f255b6d5337eb085bb86cd (diff) |
Add names to threads
Diffstat (limited to 'term/hurdio.c')
-rw-r--r-- | term/hurdio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/term/hurdio.c b/term/hurdio.c index eab59b72..acabe122 100644 --- a/term/hurdio.c +++ b/term/hurdio.c @@ -200,6 +200,8 @@ hurdio_reader_loop (void *arg) mach_msg_type_number_t datalen; error_t err; + pthread_setname_np (pthread_self (), "reader"); + pthread_mutex_lock (&global_lock); reader_thread = mach_thread_self (); @@ -254,6 +256,8 @@ hurdio_writer_loop (void *arg) int npending_output_copy; mach_port_t ioport_copy; + pthread_setname_np (pthread_self (), "writer"); + pthread_mutex_lock (&global_lock); writer_thread = mach_thread_self (); |