From: Duncan Sands <baldrick@wanadoo.fr>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@lists.sourceforge.net
Subject: Re: 2.5.50: sleeping function called from illegal context
Date: Tue, 3 Dec 2002 13:21:41 +0100 [thread overview]
Message-ID: <200212031321.41585.baldrick@wanadoo.fr> (raw)
In-Reply-To: <3DE3F32200B4A5E8@mel-rti20.wanadoo.fr>
On Tuesday 03 December 2002 19:34, Paul Davis wrote:
> >I guess another way of dealing with this kind of problem is to use a
> >semaphore rather than a spinlock, and a workqueue: when the interrupt
> >comes in, the call to snd_ctl_notify is put on the queue, where it will
> > later be run in process context, and can safely take the semaphore.
>
> can i get a pointer to some code that does this? we need to do this
> for handling MIDI I/O in the hammerfall dsp driver. doing it from
> the interrupt handler causes audio dropouts because the midi i/o is so
> much slower.
For the use of workqueues (introduced in 2.5), see
http://lwn.net/Articles/11360/
and
http://lwn.net/Articles/10963/
For the use of task queues (now gone) and tasklets,
see for example "Linux device drivers" by Rubini and
Corbet.
If you need to go to sleep, you need to use a workqueue.
If you are happy running in interrupt context, a tasklet may
be enough.
I hope this helps,
Duncan.
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
next parent reply other threads:[~2002-12-03 12:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3DE3F32200B4A5E8@mel-rti20.wanadoo.fr>
2002-12-03 12:21 ` Duncan Sands [this message]
2002-12-04 15:41 ` 2.5.50: sleeping function called from illegal context Takashi Iwai
2002-12-03 3:07 Duncan Sands
2002-12-03 12:01 ` Takashi Iwai
2002-12-03 3:55 ` Duncan Sands
2002-12-03 13:56 ` Takashi Iwai
2002-12-03 5:57 ` Duncan Sands
2002-12-03 14:56 ` Takashi Iwai
2002-12-03 6:39 ` Duncan Sands
2002-12-06 13:13 ` Duncan Sands
2002-12-03 18:34 ` Paul Davis
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=200212031321.41585.baldrick@wanadoo.fr \
--to=baldrick@wanadoo.fr \
--cc=alsa-devel@lists.sourceforge.net \
--cc=paul@linuxaudiosystems.com \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.