Luiz Fernando N. Capitulino wrote:
> |   take mutex
> |   take port lock
> | again:
> |   save local copy of icount
> |   release port lock
> |   get_mctrl
> |   take port lock
> |   if (icount changed)
> |     goto again
> |   update tty->hw_stopped
> |   release port lock
> |   release mutex
> 
>  Well, I think it'd work. But how can we keep track of 'icount'?
> Should the driver add 1 if it updates 'tty->hw_stopped'?

The only thing about icount that needs to be
tracked is that it changes, which indicates
an interrupt might have changed hw_stopped.
If icount changes at all, invalidate the last
reading of the state and do it again. The way
icount is incremented is not changed.

Like I said, it is really ugly. I was just looking
for a way of allowing get_mctrl to sleep if necessary.

-- 
Paul Fulghum
Microgate Systems, Ltd.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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