Lines Matching refs:length
174 size_t length);
180 * @length: number of bytes to write
191 size_t length)
198 if (unlikely(buf->offset + length > chan->subbuf_size))
199 length = relay_switch_subbuf(buf, length);
200 memcpy(buf->data + buf->offset, data, length);
201 buf->offset += length;
209 * @length: number of bytes to write
219 size_t length)
224 if (unlikely(buf->offset + length > buf->chan->subbuf_size))
225 length = relay_switch_subbuf(buf, length);
226 memcpy(buf->data + buf->offset, data, length);
227 buf->offset += length;
234 * @length: number of bytes to reserve
242 static inline void *relay_reserve(struct rchan *chan, size_t length)
247 if (unlikely(buf->offset + length > buf->chan->subbuf_size)) {
248 length = relay_switch_subbuf(buf, length);
249 if (!length)
253 buf->offset += length;
263 * @length: number of bytes to reserve
269 size_t length)
271 BUG_ON(length >= buf->chan->subbuf_size - 1);
272 buf->offset = length;