On Mon, Jun 19, 2000 at 07:37:30AM -0500, Shel Hoffman wrote:
> >Can anyone describe a case where it is a good idea to use FP in an init module?
> >[snip]
>
> I observed the following message in the RTLinux list that may help to address
> this question. I don't know if what Daniela is doing is a "good idea" but
> there is a reference to a floating point value in the init_module() code below.
>
> Daniela: could the floating point reference ("10.0") in your init_module()
> code be causing the crash? It sounds to me that floating point is not supposed
> to be used in the init_module() function.
Right. This is a violation of Linux kernel code conventions. Linux assumes that
FP is _not_ used in kernel mode. RTLinux allows use in RT threads that have asked
for FP. So moving FP code into a FP enabled thread is fine, doing FP in user mode
is fine, but FP in Linux kernel mode is not fine. We could make it work, but my
preference is to not put things into the common code unless there is a demonstrated
need. So the question is whether it's better to change the application or the
RTkernel.
>
> >--------------------------------------------------------------------------------
> > Date: Fri, 16 Jun 2000 11:12:31
> > From: Daniela Soares de Almeida <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [rtl] Problems with fifos and Doubts about periodic tasks
> >--------------------------------------------------------------------------------
> >
> >--------------------------------------------------------------------------------
> >
> >Hi Gabor and Vasili, thanks for your attention,
> >
> >[snip]
> >
> > Another thing is that my system always freeze in the first time that i
> >send commands to initiate the periodic tasks, i mean: i turn on the
> >computer, do a insmod with my module name and when i try initiate my
> >periodic tasks (running a monitor program) the system freeze, so i have to
> >reset the computer, my HD is checked and i try everything again, and this
> >time it works. Is there any way to check what happened when the system
> >freeze?
> >
> >A piece of my module:
> >
> >[snip]
> >
> >int init_module(void)
> >{
> > int adstatus;
> > int err;
> > int c[5];
> >
> >#ifdef V1
> > RTIME now;
> >#endif
> >
> >#ifdef V2
> > struct sched_param sched_param;
> > hrtime_t now;
> >#endif
> >
> >
> >#ifdef DAS1600
> >int base = das1601_port_base ? das1601_port_base : AD_BASE; //Determina se
> >o endereco base sera o mesmo do arquivo .h
> >range=0x20;
> >if (AD_POL==0) {
> > VADPP = 10.0;} // a placa do DAS esta ajustada para trabalhar de 0 a +10
> >volts
> >else {
> > VADPP = 20.0;} // a placa do DAS esta ajustada para trabalhar de -10 a
> >+10 volts
> >#endif
> >[snip]
>
>
> ------------------------
> Shel Hoffman
> Reflective Computing
> 917 Alanson Dr
> St.Louis, MO 63132
> (314) 993-6132 voice
> (314) 993-3316 fax
>
>
> -- [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/
--
---------------------------------------------------------
Victor Yodaiken
FSMLabs: www.fsmlabs.com www.rtlinux.com
FSMLabs is a servicemark and a service of
VJY Associates L.L.C, New Mexico.
-- [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/