aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_i.h
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-03 20:27:02 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-03 23:01:46 -0700
commite4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 (patch)
tree579aa5f63874d979ec7b233214dbb0ee8debf260 /lib/fuse_i.h
parente572cfbd3490add057b867c29d37da51ee8217e5 (diff)
Merge master fuse_chan into fuse_session.
This is a code simplification patch. - It confines most of the implementation channel implementation into fuse_loop_mt (which is its only user). - It makes it more obvious in the code that channels are only ever used when using -o clone_fd and multi-threaded main loop. - It simplies the definition of both struct fuse_session and struct fuse_chan. - Theoretically it should result in (minuscule) performance improvements when not using -o clone_fd. - Overall, it removes a lot more lines of source code than it adds :-).
Diffstat (limited to 'lib/fuse_i.h')
-rw-r--r--lib/fuse_i.h57
1 files changed, 2 insertions, 55 deletions
diff --git a/lib/fuse_i.h b/lib/fuse_i.h
index 16a96d9..c968321 100644
--- a/lib/fuse_i.h
+++ b/lib/fuse_i.h
@@ -9,23 +9,18 @@
#include "fuse.h"
#include "fuse_lowlevel.h"
-struct fuse_chan;
struct fuse_ll;
struct mount_opts;
struct fuse_session {
struct fuse_ll *f;
char *mountpoint;
-
volatile int exited;
-
- struct fuse_chan *ch;
+ int fd;
struct mount_opts *mo;
};
struct fuse_chan {
- struct fuse_session *se;
-
pthread_mutex_t lock;
int ctr;
int fd;
@@ -116,57 +111,10 @@ struct fuse_module {
int ctr;
};
-int fuse_chan_clearfd(struct fuse_chan *ch);
-void fuse_chan_close(struct fuse_chan *ch);
-
/* ----------------------------------------------------------- *
- * Channel interface *
+ * Channel interface (when using -o clone_fd) *
* ----------------------------------------------------------- */
- /**
- * Create a new channel
- *
- * @param op channel operations
- * @param fd file descriptor of the channel
- * @return the new channel object, or NULL on failure
- */
-struct fuse_chan *fuse_chan_new(int fd);
-
-/**
- * Query the session to which this channel is assigned
- *
- * @param ch the channel
- * @return the session, or NULL if the channel is not assigned
- */
-struct fuse_session *fuse_chan_session(struct fuse_chan *ch);
-
-/**
- * Remove the channel from a session
- *
- * If the channel is not assigned to a session, then this is a no-op
- *
- * @param ch the channel to remove
- */
-void fuse_session_remove_chan(struct fuse_chan *ch);
-
-/**
- * Assign a channel to a session
- *
- * If a session is destroyed, the assigned channel is also destroyed
- *
- * @param se the session
- * @param ch the channel
- */
-void fuse_session_add_chan(struct fuse_session *se, struct fuse_chan *ch);
-
-/**
- * Return channel assigned to the session
- *
- * @param se the session
- * @return the channel
- */
-struct fuse_chan *fuse_session_chan(struct fuse_session *se);
-
/**
* Obtain counted reference to the channel
*
@@ -182,7 +130,6 @@ struct fuse_chan *fuse_chan_get(struct fuse_chan *ch);
*/
void fuse_chan_put(struct fuse_chan *ch);
-
struct mount_opts *parse_mount_opts(struct fuse_args *args);
void destroy_mount_opts(struct mount_opts *mo);
void fuse_mount_help(void);