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 /nfs/rpc.c | |
parent | 7ac18bc84ae7c5a5f2f255b6d5337eb085bb86cd (diff) |
Add names to threads
Diffstat (limited to 'nfs/rpc.c')
-rw-r--r-- | nfs/rpc.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -36,6 +36,7 @@ #include <error.h> #include <unistd.h> #include <stdio.h> +#include <pthread.h> /* 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); |