summaryrefslogtreecommitdiff
path: root/nfs/rpc.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-02-08 21:25:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-02-08 21:25:55 +0100
commit883af6aa527c4d0b43adc99c19e1cbb53153a7a0 (patch)
treeab4170eae8919f11855e3b8a69f13457b4fa601d /nfs/rpc.c
parent7ac18bc84ae7c5a5f2f255b6d5337eb085bb86cd (diff)
Add names to threads
Diffstat (limited to 'nfs/rpc.c')
-rw-r--r--nfs/rpc.c5
1 files changed, 5 insertions, 0 deletions
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 <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);