aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_loop_mt.c
diff options
context:
space:
mode:
authorBernd Schubert <bernd@bsbernd.com>2025-01-27 21:33:43 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-01-28 12:34:01 +0100
commit43ec53d6a16363184a95e59627c3f54d5568d8d1 (patch)
tree7462f25465d27fca569aefcd5403239eb0cd8219 /lib/fuse_loop_mt.c
parentda3c7e6216a929beac902991004c500993d87d95 (diff)
downloadlibfuse-43ec53d6a16363184a95e59627c3f54d5568d8d1.tar.gz
lib: Set thread names
Main worker threads: fuse_worker high level clean up threads: "fuse_prune_nodes" Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r--lib/fuse_loop_mt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index 0e79b49..95316f7 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -8,6 +8,8 @@
See the file COPYING.LIB.
*/
+#define _GNU_SOURCE
+
#include "fuse_config.h"
#include "fuse_lowlevel.h"
#include "fuse_misc.h"
@@ -130,6 +132,8 @@ static void *fuse_do_work(void *data)
struct fuse_worker *w = (struct fuse_worker *) data;
struct fuse_mt *mt = w->mt;
+ pthread_setname_np(pthread_self(), "fuse_worker");
+
while (!fuse_session_exited(mt->se)) {
int isforget = 0;
int res;