Sounds like a missing FWAIT instruction which is supposed to force the
program to wait until all previous fp operations (in this case probably the
saving and restoring of its state) are completed.  Its very likely that the
next operation doesn't succeed because the initialization isn't complete and
creates a FP exception which is being interpreted as a missing coprocessor.

Have you tried just a wait (even a software loop will do as an experiment)?

        Norm

> -----Original Message-----
> From: Cory Papenfuss [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 20, 2000 8:24 PM
> To:   Paul Jacyk
> Cc:   [EMAIL PROTECTED]
> Subject:      Re: [rtl] fpu exception 7 ??
> 
>       I had the same problem when I tried to initialize a thread with
> pthread_setfp_np() in the init_module() portion of module.  As near as I
> could
> tell, once I pthread_create()'d the module, even though the very next line
> was
> to enable fp, the thread had tried executing fp code before it was enabled
> to
> do so.  I inserted a pthread_suspend_np() in the thread and
> then a pthread_wakeup_np() in the init and it seemed to work around it.
> 
> BTW, is this a silly thing to do?  What's the correct order to create
> threads
> and set their parameters if not?
> 
> cheers,
> -Cory
> 
> On Tue, 20 Jun 2000, Paul Jacyk wrote:
> 
> > Hello,
> > 
> > I just got the new RTLinux 3.0-pre6. So far it works well. More of my
> > program actually runs now than in RTLinux 2.3 (still not all the way)
> > I'm running all of this on an AMD K6 machine that according to
> > /proc/cpuinfo has a floating point unit.
> > 
> > A message appeared "rtl_debug exception 7" when I inserted my module.
> > I'm not sure why this would happen. Isn't floating point supported in
> > RTLinux on a K6 ?  I compiled the kernel with the "K6/II/III" processor
> > option for CONFIG_M386 and all other options set to "no" in the
> > processor type and features config. Are the exceptions different on a K6
> > than on a intel chip ?
> > 
> > As far as I can tell I'm calling pthread_setfp_np in the correct place.
> > If I am not calling in properly what error message will show up ?
> > 
> > >From a table of interrupt assignments in the Intel 386, 486 SX/DX
> > processors, and the Pentium processor.
> > 
> > 7        Device not available
> > Exception 7 is used to signal that a floating point processor is
> >         not present in the SX model. Exception 7 is used for programs
> >         and OSs that have floating point emulation. In addition, the DX
> >         chips can be set to trap floating point instructions by setting
> >         bit 2 of CR0.
> > 
> > Thanks,
> > 
> > Paul
> > 
> > 
> > 
> > 
> > -- [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/
-- [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