From: Takashi Iwai <tiwai@suse.de>
To: Abramo Bagnara <abramo.bagnara@tin.it>
Cc: Jaroslav Kysela <perex@perex.cz>,
alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: Re: [alsa-cvslog] CVS: alsa-kernel/core rawmidi.c,1.40,1.41
Date: Mon, 02 Feb 2004 12:13:53 +0100 [thread overview]
Message-ID: <s5hoeshwx72.wl@alsa2.suse.de> (raw)
In-Reply-To: <401D318E.4020100@tin.it>
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
prev parent reply other threads:[~2004-02-02 11:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1AnKYI-0000sI-Hg@sc8-pr-cvs1.sourceforge.net>
2004-02-01 17:04 ` [alsa-cvslog] CVS: alsa-kernel/core rawmidi.c,1.40,1.41 Abramo Bagnara
2004-02-02 8:41 ` Jaroslav Kysela
2004-02-02 10:12 ` Abramo Bagnara
2004-02-02 10:19 ` Abramo Bagnara
2004-02-02 11:13 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hoeshwx72.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=abramo.bagnara@tin.it \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox