Lines Matching refs:buf
69 struct rchan_buf * __percpu *buf; /* per-cpu channel buffers */ member
101 int (*subbuf_start) (struct rchan_buf *buf,
134 struct rchan_buf *buf,
171 extern int relay_buf_full(struct rchan_buf *buf);
173 extern size_t relay_switch_subbuf(struct rchan_buf *buf,
194 struct rchan_buf *buf; in relay_write() local
197 buf = *this_cpu_ptr(chan->buf); in relay_write()
198 if (unlikely(buf->offset + length > chan->subbuf_size)) in relay_write()
199 length = relay_switch_subbuf(buf, length); in relay_write()
200 memcpy(buf->data + buf->offset, data, length); in relay_write()
201 buf->offset += length; in relay_write()
221 struct rchan_buf *buf; in __relay_write() local
223 buf = *get_cpu_ptr(chan->buf); in __relay_write()
224 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) in __relay_write()
225 length = relay_switch_subbuf(buf, length); in __relay_write()
226 memcpy(buf->data + buf->offset, data, length); in __relay_write()
227 buf->offset += length; in __relay_write()
228 put_cpu_ptr(chan->buf); in __relay_write()
245 struct rchan_buf *buf = *get_cpu_ptr(chan->buf); in relay_reserve() local
247 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) { in relay_reserve()
248 length = relay_switch_subbuf(buf, length); in relay_reserve()
252 reserved = buf->data + buf->offset; in relay_reserve()
253 buf->offset += length; in relay_reserve()
256 put_cpu_ptr(chan->buf); in relay_reserve()
268 static inline void subbuf_start_reserve(struct rchan_buf *buf, in subbuf_start_reserve() argument
271 BUG_ON(length >= buf->chan->subbuf_size - 1); in subbuf_start_reserve()
272 buf->offset = length; in subbuf_start_reserve()