From 883af6aa527c4d0b43adc99c19e1cbb53153a7a0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 8 Feb 2025 21:25:55 +0100 Subject: Add names to threads --- libmachdev/ds_routines.c | 3 +++ libmachdev/trivfs_server.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'libmachdev') diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index aeb7f5af..cdb820fb 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -367,6 +368,8 @@ machdev_register (struct machdev_device_emulation_ops *ops) void * machdev_server(void *arg) { + pthread_setname_np (pthread_self (), "machdev_server"); + /* Launch. */ do { diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index d2031974..2c905a63 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -554,6 +555,7 @@ machdev_trivfs_server_startup(mach_port_t bootstrap) void * machdev_trivfs_server_loop(void *arg) { + pthread_setname_np (pthread_self (), "machdev_trivfs"); /* Launch. */ do { @@ -566,6 +568,7 @@ machdev_trivfs_server_loop(void *arg) void * machdev_trivfs_server_loop_forever(void *arg) { + pthread_setname_np (pthread_self (), "machdev_trivfs"); /* Launch. */ do { -- cgit v1.2.3