• Home
  • Raw
  • Download

Lines Matching refs:ch

26     struct fuse_chan *ch;  member
56 void fuse_session_add_chan(struct fuse_session *se, struct fuse_chan *ch) in fuse_session_add_chan() argument
58 assert(se->ch == NULL); in fuse_session_add_chan()
59 assert(ch->se == NULL); in fuse_session_add_chan()
60 se->ch = ch; in fuse_session_add_chan()
61 ch->se = se; in fuse_session_add_chan()
64 void fuse_session_remove_chan(struct fuse_chan *ch) in fuse_session_remove_chan() argument
66 struct fuse_session *se = ch->se; in fuse_session_remove_chan()
68 assert(se->ch == ch); in fuse_session_remove_chan()
69 se->ch = NULL; in fuse_session_remove_chan()
70 ch->se = NULL; in fuse_session_remove_chan()
75 struct fuse_chan *ch) in fuse_session_next_chan() argument
77 assert(ch == NULL || ch == se->ch); in fuse_session_next_chan()
78 if (ch == NULL) in fuse_session_next_chan()
79 return se->ch; in fuse_session_next_chan()
85 struct fuse_chan *ch) in fuse_session_process() argument
87 se->op.process(se->data, buf, len, ch); in fuse_session_process()
94 if (se->ch != NULL) in fuse_session_destroy()
95 fuse_chan_destroy(se->ch); in fuse_session_destroy()
124 struct fuse_chan *ch = (struct fuse_chan *) malloc(sizeof(*ch)); in fuse_chan_new_common() local
125 if (ch == NULL) { in fuse_chan_new_common()
130 memset(ch, 0, sizeof(*ch)); in fuse_chan_new_common()
131 ch->op = *op; in fuse_chan_new_common()
132 ch->fd = fd; in fuse_chan_new_common()
133 ch->bufsize = bufsize; in fuse_chan_new_common()
134 ch->data = data; in fuse_chan_new_common()
136 return ch; in fuse_chan_new_common()
145 int fuse_chan_fd(struct fuse_chan *ch) in fuse_chan_fd() argument
147 return ch->fd; in fuse_chan_fd()
150 size_t fuse_chan_bufsize(struct fuse_chan *ch) in fuse_chan_bufsize() argument
152 return ch->bufsize; in fuse_chan_bufsize()
155 void *fuse_chan_data(struct fuse_chan *ch) in fuse_chan_data() argument
157 return ch->data; in fuse_chan_data()
160 struct fuse_session *fuse_chan_session(struct fuse_chan *ch) in fuse_chan_session() argument
162 return ch->se; in fuse_chan_session()
167 struct fuse_chan *ch = *chp; in fuse_chan_recv() local
169 return ch->op.receive(chp, buf, size); in fuse_chan_recv()
173 int fuse_chan_receive(struct fuse_chan *ch, char *buf, size_t size) in fuse_chan_receive() argument
177 res = fuse_chan_recv(&ch, buf, size); in fuse_chan_receive()
182 int fuse_chan_send(struct fuse_chan *ch, const struct iovec iov[], size_t count) in fuse_chan_send() argument
184 return ch->op.send(ch, iov, count); in fuse_chan_send()
187 void fuse_chan_destroy(struct fuse_chan *ch) in fuse_chan_destroy() argument
189 fuse_session_remove_chan(ch); in fuse_chan_destroy()
190 if (ch->op.destroy) in fuse_chan_destroy()
191 ch->op.destroy(ch); in fuse_chan_destroy()
192 free(ch); in fuse_chan_destroy()