Logo Search packages:      
Sourcecode: fuse version File versions  Download package

int fuse_loop_mt_proc ( struct fuse f,
fuse_processor_t  proc,
void *  data 

Multi threaded event loop, which calls the custom command processor function

Definition at line 69 of file fuse_mt.c.

References fuse_session_ops::exit, fuse_chan_fd(), fuse_get_session(), fuse_loop_mt_proc(), fuse_session_add_chan(), fuse_session_destroy(), fuse_session_loop_mt(), fuse_session_new(), fuse_session_next_chan(), and fuse_chan_ops::receive.

Referenced by fuse_loop_mt_proc().

      int res;
      struct procdata pd;
      struct fuse_session *prevse = fuse_get_session(f);
      struct fuse_session *se;
      struct fuse_chan *prevch = fuse_session_next_chan(prevse, NULL);
      struct fuse_chan *ch;
      struct fuse_session_ops sop = {
            .exit = mt_session_exit,
            .exited = mt_session_exited,
            .process = mt_session_proc,
      struct fuse_chan_ops cop = {
            .receive = mt_chan_receive,

      pd.f = f;
      pd.prevch = prevch;
      pd.prevse = prevse;
      pd.proc = proc;
      pd.data = data;

      se = fuse_session_new(&sop, &pd);
      if (se == NULL)
            return -1;

      ch = fuse_chan_new(&cop, fuse_chan_fd(prevch),
                     sizeof(struct fuse_cmd *), &pd);
      if (ch == NULL) {
            return -1;
      fuse_session_add_chan(se, ch);
      res = fuse_session_loop_mt(se);
      return res;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index