summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2014-06-04 15:28:59 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2014-06-26 10:22:34 +0200
commitae95ca8687176b47a43f2b58f37d94c51aab303f (patch)
treed7613eb97974c4e84d4d6e750fd114d74cdd3ebf
parent4cee4915dbc3a76bd6c354f17c98cf22be3802c8 (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;
}