summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2014-06-04 15:28:59 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2015-03-09 12:44:02 +0100
commit5b21b40aa65ef1e005a0faed38477d2dfc129d25 (patch)
treebdfbb78b2cee9477b1ea01c0c459fe6ee3313823
parente11d112cfc1cfbc7a0f5116f00f6d787a63aac5a (diff)
PSXALARM01: fails sometimes on LEON
The printf() causing the problem is removed temporarily. It must be analysed more in depth why this problem occurs. The stack is overflowed when the signal handler is called. What triggers it might be related to a slow UART, but I believe the actual problem is something else. The following steps can be seen: 1. Thread is switched in, a call frame is added for the signal handler. 2. The signal handler calls printf() 3. a semaphore is taken which blocks the signal handler 4. the task switched in again, but now it starts execcuting the signal handler *again*. Jump to 1. After a couple of loops the stack is overflowed. It might be that systems with a larger UART FIFO or faster UART is not affected.
-rw-r--r--testsuites/psxtests/psxalarm01/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxalarm01/init.c b/testsuites/psxtests/psxalarm01/init.c
index b6bf1d7cb2..46b5899193 100644
--- a/testsuites/psxtests/psxalarm01/init.c
+++ b/testsuites/psxtests/psxalarm01/init.c
@@ -35,12 +35,14 @@ void Signal_handler(
)
{
Signal_count++;
+#if 0
printf(
"Signal: %d caught by 0x%" PRIxpthread_t " (%d)\n",
signo,
pthread_self(),
Signal_count
);
+#endif
Signal_occurred = 1;
}