Re: [PATCH] kfifo: overflow of unsigned integer

2007-02-09 Thread Cong WANG
2007/2/9, Andrew Morton <[EMAIL PROTECTED]>: On Thu, 8 Feb 2007 20:16:55 +0800 "Cong WANG" <[EMAIL PROTECTED]> wrote: > 2007/2/8, Andrew Morton <[EMAIL PROTECTED]>: > > On Thu, 8 Feb 2007 17:07:28 +0800 "Cong WANG" <[EMAIL PROTECTED]> wrote: > > > > > Kfifo is a ring-buffer in kernel which can b

Re: [PATCH] kfifo: overflow of unsigned integer

2007-02-08 Thread Andrew Morton
On Thu, 8 Feb 2007 17:07:28 +0800 "Cong WANG" <[EMAIL PROTECTED]> wrote: > Kfifo is a ring-buffer in kernel which can be used as a lock-free way > for concurrent read/write when there are only one producer and one > consumer. Details of its design can be found in kernel/kfifo.c and > include/linux

[PATCH] kfifo: overflow of unsigned integer

2007-02-08 Thread Cong WANG
Kfifo is a ring-buffer in kernel which can be used as a lock-free way for concurrent read/write when there are only one producer and one consumer. Details of its design can be found in kernel/kfifo.c and include/linux/kfifo.h. You will find that the 'in' and 'out' fields of 'struct kfifo' are bot