kfifo 試す (8)
試験してませんが、現状の実装では kfifo 構造体の buffer 属性
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) */ spinlock_t *lock; /* protects concurrent modifications */ };
が溢れたら無視。
てーコトは
- buffer を kmalloc しなおして中身をコピイ
- 中身のコピィは工夫が必要
- できればアタマから入れ直して in と out を再設定
- size をしなおした広さに再設定
ができればナニ。
試験
な printk も含め、色々と面白そげ。