aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/hello_ll.c10
-rw-r--r--example/invalidate_path.c10
-rw-r--r--example/notify_inval_entry.c10
-rw-r--r--example/notify_inval_inode.c10
-rw-r--r--example/notify_store_retrieve.c10
-rw-r--r--example/passthrough_ll.c10
6 files changed, 42 insertions, 18 deletions
diff --git a/example/hello_ll.c b/example/hello_ll.c
index 668d81b..1db5eff 100644
--- a/example/hello_ll.c
+++ b/example/hello_ll.c
@@ -18,7 +18,7 @@
* \include hello_ll.c
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse_lowlevel.h>
#include <stdio.h>
@@ -166,6 +166,7 @@ int main(int argc, char *argv[])
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
int ret = -1;
if (fuse_parse_cmdline(&args, &opts) != 0)
@@ -206,8 +207,11 @@ int main(int argc, char *argv[])
/* Block until ctrl+c or fusermount -u */
if (opts.singlethread)
ret = fuse_session_loop(se);
- else
- ret = fuse_session_loop_mt(se, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ ret = fuse_session_loop_mt(se, &config);
+ }
fuse_session_unmount(se);
err_out3:
diff --git a/example/invalidate_path.c b/example/invalidate_path.c
index 09df178..61ec351 100644
--- a/example/invalidate_path.c
+++ b/example/invalidate_path.c
@@ -25,7 +25,7 @@
* \include @file
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse.h>
#include <fuse_lowlevel.h> /* for fuse_cmdline_opts */
@@ -212,6 +212,7 @@ int main(int argc, char *argv[]) {
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse *fuse;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
int res;
/* Initialize the files */
@@ -271,8 +272,11 @@ int main(int argc, char *argv[]) {
if (opts.singlethread)
res = fuse_loop(fuse);
- else
- res = fuse_loop_mt(fuse, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ res = fuse_loop_mt(fuse, &config);
+ }
if (res)
res = 1;
diff --git a/example/notify_inval_entry.c b/example/notify_inval_entry.c
index 00a1c09..9f50992 100644
--- a/example/notify_inval_entry.c
+++ b/example/notify_inval_entry.c
@@ -73,7 +73,7 @@
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse_lowlevel.h>
#include <stdio.h>
@@ -273,6 +273,7 @@ int main(int argc, char *argv[]) {
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
pthread_t updater;
int ret = -1;
@@ -321,8 +322,11 @@ int main(int argc, char *argv[]) {
/* Block until ctrl+c or fusermount -u */
if (opts.singlethread)
ret = fuse_session_loop(se);
- else
- ret = fuse_session_loop_mt(se, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ ret = fuse_session_loop_mt(se, &config);
+ }
fuse_session_unmount(se);
err_out3:
diff --git a/example/notify_inval_inode.c b/example/notify_inval_inode.c
index 6f34b8f..b3b50aa 100644
--- a/example/notify_inval_inode.c
+++ b/example/notify_inval_inode.c
@@ -59,7 +59,7 @@
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse_lowlevel.h>
#include <stdio.h>
@@ -289,6 +289,7 @@ int main(int argc, char *argv[]) {
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
pthread_t updater;
int ret = -1;
@@ -340,8 +341,11 @@ int main(int argc, char *argv[]) {
/* Block until ctrl+c or fusermount -u */
if (opts.singlethread)
ret = fuse_session_loop(se);
- else
- ret = fuse_session_loop_mt(se, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ ret = fuse_session_loop_mt(se, &config);
+ }
fuse_session_unmount(se);
err_out3:
diff --git a/example/notify_store_retrieve.c b/example/notify_store_retrieve.c
index 2cffacc..0a165c5 100644
--- a/example/notify_store_retrieve.c
+++ b/example/notify_store_retrieve.c
@@ -58,7 +58,7 @@
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse_lowlevel.h>
#include <stdio.h>
@@ -350,6 +350,7 @@ int main(int argc, char *argv[]) {
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
pthread_t updater;
int ret = -1;
@@ -398,8 +399,11 @@ int main(int argc, char *argv[]) {
/* Block until ctrl+c or fusermount -u */
if (opts.singlethread)
ret = fuse_session_loop(se);
- else
- ret = fuse_session_loop_mt(se, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ ret = fuse_session_loop_mt(se, &config);
+ }
assert(retrieve_status != 1);
fuse_session_unmount(se);
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index 06bb50f..0e7535c 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -35,7 +35,7 @@
*/
#define _GNU_SOURCE
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include "config.h"
@@ -1156,6 +1156,7 @@ int main(int argc, char *argv[])
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
struct lo_data lo = { .debug = 0,
.writeback = 0 };
int ret = -1;
@@ -1255,8 +1256,11 @@ int main(int argc, char *argv[])
/* Block until ctrl+c or fusermount -u */
if (opts.singlethread)
ret = fuse_session_loop(se);
- else
- ret = fuse_session_loop_mt(se, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ ret = fuse_session_loop_mt(se, &config);
+ }
fuse_session_unmount(se);
err_out3: