fifo
简介
struct kfifo {
unsigned char *buffer; /* the buffer holding the data */
unsigned int size; /* the size of the allocated buffer */
unsigned int in; /* data is added at offset (in % size) */
unsigned int out; /* data is extracted from off. (out % size) */
};int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask);unsigned int kfifo_in(struct kfifo *fifo, const void *from, unsigned int len);unsigned int kfifo_out(struct kfifo *fifo, void *to, unsigned int len);void kfifo_free(struct kfifo *fifo);实践
Last updated