Re: [Fwd: [patch] media video cx23888 driver: ported to new kfifo API]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, den 18.12.2009, 14:00 -0800 schrieb Andrew Morton:
> On Fri, 18 Dec 2009 22:57:22 +0100
> Stefani Seibold <stefani@xxxxxxxxxxx> wrote:
> 
> > But kfifo_len() did not
> > requiere a lock in my opinion. It is save to use without a look. 
> 
> What do you mean by this?  Safe in general, or safe in this particular driver?
> 

Safe until you don't call kfifo_reset(). kfifo_reset() is evil, because
it it the only function which breaks the single read/writer concept. 

This function modifies the in and the out fifo counters. Thats why i
introduced the kfifo_reset_out() function, which set the out to the
value of in, which means the fifo is empty. This function can be call
from the receiver of a fifo without locking.  

Stefani




--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux