Also, my illegal instruction happens after running a short time. My
simple example prints in a loop, and starts a thread that prints in a
loop. I see the child thread loop about a dozen times before the
illegal instruction.
-
allon
I had a very similar bug when getting pthreads working on a uClinux port
I was doing.
The problem turned out to be incorrect cache flushing on the signal
trampoline (arch/kernel/signal.c -- setup_frame()).
The pthread library uses lots of signals to wake up and manage threads etc.
If the signal trampoline is not properly flushed, you can get a cache
hit rather than executing the trap instruction which is written into the
user tasks stack frame to return from the signal handler. If this
happens you end up executing your stack :-(
A simple way to check if this is the problem is to turn the cache off
completely and see if your pthread apps run ok (albeit slowly).
Peter.
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev