summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2014-06-04 15:28:59 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2014-11-19 16:29:57 +0100
commitee82858eeab040e4cece1425662a20450b5e55b5 (patch)
tree0fc000d84e5440aca1c63594e1313712cced7e1d
parent482e7a8ee4f7e0e9f576627ac3725fedf983fc42 (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;
}