Lines Matching refs:cap
22 * @cap: Maximum capacity of the buffer.
27 size_t cap;
34 * @cap: The length of the memory backing the buffer, i.e. its capacity.
39 static inline void sshp_buf_init(struct sshp_buf *buf, u8 *ptr, size_t cap)
43 buf->cap = cap;
49 * @cap: The desired capacity of the buffer.
52 * Allocates @cap bytes and initializes the provided buffer struct with the
57 static inline int sshp_buf_alloc(struct sshp_buf *buf, size_t cap, gfp_t flags)
61 ptr = kzalloc(cap, flags);
65 sshp_buf_init(buf, ptr, cap);
82 buf->cap = 0;
116 n = kfifo_out(fifo, buf->ptr + buf->len, buf->cap - buf->len);