From 2bfa342cdadbcb3d4421dd752bbe1e63e0f6430f Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 10 Oct 2016 21:29:36 -0700 Subject: Make -o clone_fd into a parameter of session_loop_mt(). This option really affects the behavior of the session loop, not the low-level interface. Therefore, it does not belong in the fuse_session object. --- include/fuse.h | 4 +++- include/fuse_lowlevel.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/fuse.h b/include/fuse.h index 8943835..5b9082b 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -748,11 +748,13 @@ void fuse_exit(struct fuse *f); * in the callback function of fuse_operations is also thread-safe. * * @param f the FUSE handle + * @param clone_fd whether to use separate device fds for each thread + * (may increase performance) * @return 0 if no error occurred, -1 otherwise * * See also: fuse_loop() */ -int fuse_loop_mt(struct fuse *f); +int fuse_loop_mt(struct fuse *f, int clone_fd); /** * Get the current context diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 0f8c030..0b7ee2b 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -1657,6 +1657,7 @@ struct fuse_cmdline_opts { char *mountpoint; int show_version; int show_help; + int clone_fd; }; /** @@ -1727,9 +1728,11 @@ int fuse_session_loop(struct fuse_session *se); * Enter a multi-threaded event loop * * @param se the session + * @param clone_fd whether to use separate device fds for each thread + * (may increase performance) * @return 0 on success, -1 on error */ -int fuse_session_loop_mt(struct fuse_session *se); +int fuse_session_loop_mt(struct fuse_session *se, int clone_fd); /** * Flag a session as terminated. -- cgit v1.2.3