Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: how should ata_idle_notify handle SYS_USBCONNECTED and SYS_SHUTDOWN?

how should ata_idle_notify handle SYS_USBCONNECTED and SYS_SHUTDOWN?

From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Wed, 8 Nov 2006 00:21:29 +1100

hey,
I'm pretty sure that the idle notify callbacks should be called for
these 2 events. the problem is whats the best way to do it?
Because there is no way to know which thread gets the event in what
order (I assume this is the case) there could be callbacks putting
events on another threads que (like the rebuffering now, bad example
becuase it reads instead of writes, but anyway), if the audio thread
gets the either of these events before ata then it will never recieve
the event from the callback.

One way I thought of for getting around this is to call the callbacks,
but have a rule that if there is a possibility that a callback could
put an event on another threads queue, then that thead should call the
callback explicitly after removing it with unregister_ata_idle_func().

would this work? better ideas?
Jonathan
Received on 2006-11-07


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa