aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse.c2
-rw-r--r--lib/fuse_loop_mt.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index 136f0c2..49f5711 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -4917,7 +4917,9 @@ static void *fuse_prune_nodes(void *fuse)
struct fuse *f = fuse;
int sleep_time;
+#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), "fuse_prune_nodes");
+#endif
while(1) {
sleep_time = fuse_clean_cache(f);
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index 95316f7..d6be998 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -132,7 +132,9 @@ static void *fuse_do_work(void *data)
struct fuse_worker *w = (struct fuse_worker *) data;
struct fuse_mt *mt = w->mt;
+#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), "fuse_worker");
+#endif
while (!fuse_session_exited(mt->se)) {
int isforget = 0;