At Sun, 01 Feb 2004 18:04:14 +0100,
Abramo Bagnara wrote:
(snip)
> With this patch you break write and read atomicity, you should:
> 
> 1) read and save appl_ptr
> 2) update appl_ptr and avail
> 3) leave critical area
> 4) copy from/to user using saved appl_ptr
> 5) reenter critical area
> 
> I've just checked and a similar mistake has been done too for PCM (and 
> other places?).

or simply use semaphore instead of spinlock?
(kernel=1 can be in the interrupt context, so it'd better to down/up
 semaphore in snd_rawmidi_read(), write(), etc.)


Takashi


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to