Am Donnerstag, 15. März 2007 09:16 schrieb Greg KH: > On Wed, Mar 14, 2007 at 08:44:22PM +0100, Oliver Neukum wrote:
> > It is called in interrupt and uses no locking. What happens if the next > > irq is processed on another cpu? Is that cpu guaranteed to see the updates > > to the incremented variables? > > If you only have 1 interrupt urb, then you can't ever have multiple > instances of this code running at the same time. Or am I missing > something more obvious here? I wasn't worrying about interrupts running at the same time, but after each other on two CPUs. David has assured me that this is covered. Nevertheless, this code has a slight race. If the counters are read twice on two CPUs, the latter reader may see a lower count than the first reader. As these counters must be monotonic this is a race. I'll fix it. Regards Oliver ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel