1
0
Fork 0
forked from len0rd/rockbox

Messages queues must be guarded on both ends or else it's a race between detecting a message present and missing a wakeup on thread about to wait. Keeping IRQs from interacting with the scheduler would be preferable but this should do at the moment. Add more detailed panic info regarding blocking violations so we know who. Make panicf function well enough on Gigabeat and PortalPlayer targets. Move the core sleep instructions into a CPU-specific inline to keep thing organized.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13374 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-05-12 05:20:04 +00:00
parent 87c70db578
commit bfb281ff63
5 changed files with 124 additions and 68 deletions

View file

@ -45,13 +45,13 @@ void panicf( const char *fmt, ...)
#endif
/* Disable interrupts */
#if CONFIG_CPU == SH7034
asm volatile ("ldc\t%0,sr" : : "r"(15<<4));
#elif defined(CPU_COLDFIRE)
asm volatile ("move.w #0x2700,%sr");
#endif
#ifdef CPU_ARM
disable_fiq();
#endif
set_irq_level(DISABLE_INTERRUPTS);
#endif /* SIMULATOR */
va_start( ap, fmt );
vsnprintf( panic_buf, sizeof(panic_buf), fmt, ap );
va_end( ap );
@ -99,7 +99,16 @@ void panicf( const char *fmt, ...)
#endif
/* try to restart firmware if ON is pressed */
#ifdef IRIVER_H100_SERIES
#if defined (CPU_PP)
/* For now, just sleep the core */
if (CURRENT_CORE == CPU)
CPU_CTL = PROC_SLEEP;
else
COP_CTL = PROC_SLEEP;
#define system_reboot() nop
#elif defined (TOSHIBA_GIGABEAT_F)
if ((GPGDAT & (1 << 0)) != 0)
#elif defined (IRIVER_H100_SERIES)
if ((GPIO1_READ & 0x22) == 0) /* check for ON button and !hold */
#elif defined(IRIVER_H300_SERIES)
if ((GPIO1_READ & 0x22) == 0) /* check for ON button and !hold */