Yeah, I have had some similar weird issues myself, upgrading to rtl2.2.
I recommend keeping fp enabled but not using any double (or
float) variables - see if you can get that to run.
I found that my program, like yours, wasn't actually running. What
I did, and you could try it, was add a foo thread to my rt module.
It's a dummy thread, it does nothing except periodically cycle at 1 Hz.
With that thread present, my other real thread began to function properly,
with and without floating point operations.
In retrospect, I'm guessing it was a hack solution required because I was
initializing fp ops in the wrong place, which was leaving some toggle
variables in weird states, which the initialization of a the subsequent
foo thread fixed.
This probably could have been avoided if I had either 1) used
pthread_setfp_np in the correct place (ie. in the thread), or 2) used
pthread_attr_setfp. Since you claim to be using pthread_setfp_np
correctly, try switching to use pthread_attr_setfp (before pthread_create)
instead of pthread_setfp_np. If it works let me know, as I'd be interested
to find out what's wrong with pthread_attr_setfp.
-Chuck
On Thu, 30 Nov 2000, Estabridis, Janet P wrote:
> Hi,
>
> I have been going through the mail archives for about 30 minutes. I have
> seem that some people had had problems with floating point random crashes
> and did not see a complete resolution. So, I want to state my case here and
> see if someone can help.
>
> I have a Ampro Little Board P5X running at 266MHz with 128MBytes of memory.
>
> 1. I had some old floating point code that was running just fine on
> RTLV0.9J (kernel 2.0.36). It is coded in a timed task (every 30 HZ).
>
> 2. I have changed to miniRTLV2.3 (rtlinux 2.3 with kernel 2.2.14) to embed
> my system. Therefore I had to go to the new API calls. I do know that I am
> turning on floating point properly (I do it in my thread before any floating
> point operations). All my floating point variable are "double" and in the
> old shared memory space, except for one local variable. I read that the
> floating point variables should only be initialized after floating point is
> turned on. So I initialize them in the thread after I turn floating point
> on. That works fine.
>
> 3. My development station has Red Hat 5.2 with kernel 2.2.14 and rtlinux
> V2.3 so that I could have the correct glibc required for the miniRTLV2.3. I
> complie there and ftp to the embedded machine.
>
>
> Now, here is the weird part. The floating point code only get's executed
> when a flag is set. THIS FLAG IS CURRENTLY NOT SET, but When I add back in
> the floating point computation code and compile. When I try to insert the
> module hangs the computer it does not return from the insmod. Now, I can
> comment out some of the floating point code recompile and be able to insert
> the module and remove the module numerous times. STILL THIS CODE IS NOT
> GETTING EXECUTED IT IS JUST SITTING THERE !!!
>
> So, what is my potential problem?? Do I have an incompatiblity with my
> development station compile ?? I am baffled !!
>
> Any help is GREATLY appreciated.
>
>
> Janet Estabridis
> Electrical Engineer
> NAWC Code 472E40D
> Building 31440 Room 1017
> China Lake, CA 93555
> [EMAIL PROTECTED]
> (760) 939-2896 FAX (760) 939 -3075
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/