Home | History | Annotate | Download | only in linux

Lines Matching refs:SIZE

93 #define	kfifo_alloc(FIFO, SIZE, GFP)					      \
94 _kfifo_alloc(&(FIFO)->kf_meta, &(FIFO)->kf_buf, (SIZE), (GFP))
144 #define kfifo_out_peek(FIFO, PTR, SIZE) \
145 _kfifo_out_peek(&(FIFO)->kf_meta, (FIFO)->kf_buf, (PTR), (SIZE))
148 _kfifo_out_peek(struct kfifo_meta *meta, void *buf, void *ptr, size_t size)
159 if (size <= tail - head) {
160 memcpy(dst, src + head, size);
161 copied = size;
164 if (size <= nbytes - head) {
165 memcpy(dst, src + head, size);
166 copied = size;
167 } else if (size <= nbytes + tail - head) {
170 size - (nbytes - head));
171 copied = size;
179 #define kfifo_out(FIFO, PTR, SIZE) \
180 _kfifo_out(&(FIFO)->kf_meta, (FIFO)->kf_buf, (PTR), (SIZE))
183 _kfifo_out(struct kfifo_meta *meta, const void *buf, void *ptr, size_t size)
194 if (size <= tail - head) {
195 memcpy(dst, src + head, size);
196 meta->kfm_head = head + size;
197 copied = size;
200 if (size <= nbytes - head) {
201 memcpy(dst, src + head, size);
202 meta->kfm_head = head + size;
203 copied = size;
204 } else if (size <= nbytes + tail - head) {
207 size - (nbytes - head));
208 meta->kfm_head = size - (nbytes - head);
209 copied = size;
217 #define kfifo_in(FIFO, PTR, SIZE) \
218 _kfifo_in(&(FIFO)->kf_meta, (FIFO)->kf_buf, (PTR), (SIZE))
221 _kfifo_in(struct kfifo_meta *meta, void *buf, const void *ptr, size_t size)
232 if (size <= head - tail) {
233 memcpy(dst + tail, src, size);
234 meta->kfm_tail = tail + size;
235 copied = size;
238 if (size <= nbytes - tail) {
239 memcpy(dst + tail, src, size);
240 meta->kfm_tail = tail + size;
241 } else if (size <= nbytes + tail - head) {
244 size - (nbytes - tail));
245 meta->kfm_tail = size - (nbytes - tail);
246 copied = size;