Am Mittwoch, 7. Dezember 2005 16:40 schrieben Sie:
> On Wed, 2005-12-07 at 16:37 +0100, Oliver Neukum wrote:
> > Am Mittwoch, 7. Dezember 2005 16:22 schrieb Arjan van de Ven:
> > > > On the other hand, Oliver needs to be careful about claiming too much.  
> > > > In 
> > > > general atomic_t operations _are_ superior to the spinlock approach.
> > > 
> > > No they're not. Both are just about equally expensive cpu wise,
> > > sometimes the atomic_t ones are a bit more expensive (like on parisc
> > > architecture). But on x86 in either case it's a locked cycle, which is
> > > just expensive no matter which side you flip the coin...
> > 
> > You are refering to SMP, aren't you?
> 
> yes.
> on UP neither is a locked instruction ;)

But the atomic variant has to guard against interrupts, at least on
architectures that do load/store only, hasn't it? AFAICT it is even
theoretically impossible to tell for the compiler whether a function
is always called with interrupts off.

        Regards
                Oliver


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to