Hey all.

So for months I've been thinking floating point operations weren't
working on my system, (rtl-2.2.13), but it turns out they are.  It's
the typecasting that's giving me problems.

>From prior instructions, I do the following:

1) include float declarations...
   #include <float.h>, (and asm/types.h for what it's worth), 

2) set my thread to be floating point operational
   error_flag = pthread_setfp_np(my_thread,TRUE)

3) and compile in a 2 step manner that I don't completely understand.
Apparently it allows me to statically link lgcc? anyway, it looks like
this: (if you see a mistake please inform me...)

gcc $(RTL_INCLUDES) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
        -fno-strength-reduce -D__RT__ -D__KERNEL__ -DMODULE -c \
        -DMODVERSIONS -c rt_daq.c -o rt_daq_temp.o

gcc -nostdlib -static -r rt_daq_temp.o -o rt_daq -lgcc


So everything looks like it works. I can perform floating point
operations, and pass floating point values through the shared memory.  I
cannot however, typecast the float to something else.

the simple line>>
foo_int = (int) foo_float;

causes some rough crashes. (either system locks up, or immediately reboots
itself, with damage done to all files currently opened in xemacs.)

Does anyone else know of this typecast problem, or how I might go about
investigating it further?

Chuck



-- [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/

Reply via email to