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 --- nfs/rpc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nfs/rpc.c') diff --git a/nfs/rpc.c b/nfs/rpc.c index 2a74094a..ebd7bd1d 100644 --- a/nfs/rpc.c +++ b/nfs/rpc.c @@ -36,6 +36,7 @@ #include #include #include +#include /* One of these exists for each pending RPC. */ struct rpc_list @@ -354,6 +355,8 @@ timeout_service_thread (void *arg) { (void) arg; + pthread_setname_np (pthread_self (), "timeout"); + while (1) { sleep (1); @@ -374,6 +377,8 @@ rpc_receive_thread (void *arg) (void) arg; + pthread_setname_np (pthread_self (), "rpc_receive"); + /* Allocate a receive buffer. */ buf = malloc (1024 + read_size); assert_backtrace (buf); -- cgit v1.2.3