All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel threads etc
@ 2006-03-06 22:27 Adrian McMenamin
  0 siblings, 0 replies; 14+ messages in thread
From: Adrian McMenamin @ 2006-03-06 22:27 UTC (permalink / raw)
  To: linux-sh; +Cc: alsa-devel

I have an interrupt handler in my sound driver that calls this:

dreamcastcard->sleep_aicahw = 1;
wake_up_interruptible(&aicahw);


which is meant to wake up this code in a workqueue:

do{
	wait_event_interruptible(aicahw, (dreamcastcard->sleep_aicahw > 0));
	if (dreamcastcard->sleep_aicahw == 2) return; /* end of the road
signalled */
	snd_printk("The AICA is awake\n");
	/* write to the lower or upper area of the ring buffer? */
	buffer_size= frames_to_bytes(runtime, runtime->buffer_size);
	if (buffer_size > 16384) transfer_size = 16384;
	else transfer_size = buffer_size;
	err = dma_xfer(0, runtime->dma_area, 0x11000 + (dreamcastcard->upper) *
0x4000, transfer_size, 5);
	if (err) goto dma_fail;
	dreamcastcard->upper = 0;
	dreamcastcard->sleep_aicahw = 0;
} while (1);


But while I know the interrupt is being fired and trapped (cheating with
printk), I never see the "The AICA is awake" - is there something wrong
with sleeping inside a kernel thread in this way or some other foible I
should be aware of?




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-03-07 23:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1141684061.9230.15.camel@localhost.localdomain>
2006-03-06 23:11 ` kernel threads etc Lee Revell
2006-03-06 23:29   ` Adrian McMenamin
2006-03-06 23:38   ` Adrian McMenamin
     [not found]   ` <1141687750.9230.24.camel@localhost.localdomain>
2006-03-06 23:48     ` Lee Revell
2006-03-07  0:11       ` Adrian McMenamin
     [not found]       ` <1141690313.9230.32.camel@localhost.localdomain>
2006-03-07  0:22         ` Lee Revell
2006-03-07 21:19           ` Adrian McMenamin
2006-03-07 21:29             ` Lee Revell
2006-03-07 21:32               ` Adrian McMenamin
     [not found]               ` <1141767139.9232.17.camel@localhost.localdomain>
2006-03-07 21:36                 ` Lee Revell
2006-03-07 23:28                   ` Adrian McMenamin
2006-03-07  0:26         ` Lee Revell
     [not found]   ` <1141688305.9230.26.camel@localhost.localdomain>
2006-03-06 23:49     ` Lee Revell
2006-03-06 22:27 Adrian McMenamin

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.