Lines Matching refs:buf
69 struct rchan_buf * __percpu *buf; /* per-cpu channel buffers */ member
99 int (*subbuf_start) (struct rchan_buf *buf,
111 void (*buf_mapped)(struct rchan_buf *buf,
121 void (*buf_unmapped)(struct rchan_buf *buf,
149 struct rchan_buf *buf,
184 extern int relay_buf_full(struct rchan_buf *buf);
186 extern size_t relay_switch_subbuf(struct rchan_buf *buf,
207 struct rchan_buf *buf; in relay_write() local
210 buf = *this_cpu_ptr(chan->buf); in relay_write()
211 if (unlikely(buf->offset + length > chan->subbuf_size)) in relay_write()
212 length = relay_switch_subbuf(buf, length); in relay_write()
213 memcpy(buf->data + buf->offset, data, length); in relay_write()
214 buf->offset += length; in relay_write()
234 struct rchan_buf *buf; in __relay_write() local
236 buf = *get_cpu_ptr(chan->buf); in __relay_write()
237 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) in __relay_write()
238 length = relay_switch_subbuf(buf, length); in __relay_write()
239 memcpy(buf->data + buf->offset, data, length); in __relay_write()
240 buf->offset += length; in __relay_write()
241 put_cpu_ptr(chan->buf); in __relay_write()
258 struct rchan_buf *buf = *get_cpu_ptr(chan->buf); in relay_reserve() local
260 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) { in relay_reserve()
261 length = relay_switch_subbuf(buf, length); in relay_reserve()
265 reserved = buf->data + buf->offset; in relay_reserve()
266 buf->offset += length; in relay_reserve()
269 put_cpu_ptr(chan->buf); in relay_reserve()
281 static inline void subbuf_start_reserve(struct rchan_buf *buf, in subbuf_start_reserve() argument
284 BUG_ON(length >= buf->chan->subbuf_size - 1); in subbuf_start_reserve()
285 buf->offset = length; in subbuf_start_reserve()