diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2014-06-04 15:28:59 +0200 |
---|---|---|
committer | Daniel Cederman <cederman@gaisler.com> | 2014-06-27 11:03:25 +0200 |
commit | c22d7d725bb6c5df0020240a112341cfdcc33499 (patch) | |
tree | e8f40e2feece5786c7815665799a2e100d289873 | |
parent | ed41c2c02e9cb89ce592dd563523231c0fe87e8f (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.c | 2 |
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; } |