Am Tuesday 23 March 2004 01:28 schrieb Pete Zaitcev:
> On Mon, 22 Mar 2004 22:21:14 +0100
> Oliver Neukum <[EMAIL PROTECTED]> wrote:
> 
> > you are using an irqsave spinlock in a completion handler. Not actually
> > wrong but it tends to confuse people about the context the function is
> > executed under.
> 
> >     priv = usb_get_serial_port_data(port);
> > -   spin_lock_irqsave(&priv->lock, flags);
> > +   spin_lock(&priv->lock);
> >     priv->last_msr = data[BELKIN_SA_MSR_INDEX];
> 
> I strongly disagree with this point of view. Keeping track of a
> context in which a function can be called places an unreasonable
> burden on a programmer and introduces extremely annoying code rot
> whenever code migrates contexts.

On second thought I think I have an idea.
Is it possible to use gcc to specifically mark things that run in interrupt
like the __user designation for pointers to buffers?

        Regards
                Oliver


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to