<To: RTLinux [EMAIL PROTECTED]>
<Subject: Floating point in init_module()>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Date: Fri, 16 Jun 2000 22:55:32
> From: [EMAIL PROTECTED]
> To: Tomasz Motylewski <[EMAIL PROTECTED]>
> Subject: Re: [rtl] rt-linux:strange random system hang using FP
>--------------------------------------------------------------------------------
>
>On Fri, Jun 16, 2000 at 10:20:58PM +0200, Tomasz Motylewski wrote:
>> On Thu, 15 Jun 2000, Paolo Mantegazza wrote:
>>
>> > That's why you have to tell your real time scheduler that also Linux is
>> > using the FPU. In fact the real time task swithching is optimized in
>> > such a way to avoid saving/restoring the FPU if only one real time task
>> > is using it.
>>
>> Ah, I did not think about this possibility. But how to do it? I mean, I am in
>> init_module, and I want to use FP in it. What should I call?
>
>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.
>--------------------------------------------------------------------------------
> 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/