All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] fpu context switch issue
@ 2008-11-03  0:35 Steven Seeger
  2008-11-03 10:10 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 33+ messages in thread
From: Steven Seeger @ 2008-11-03  0:35 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 674 bytes --]

I'm having a weird issue. Sometimes when I run the attached program I
see one of the "shouldn't see this" printouts. However, it only fails if
I also link in another userspace library that doesn't do anything. (No
libraries are being called here.)

 

I've had issues with a couple of other xenomai apps. I get a nan on a
double operation sometimes right after the app first loads, and then
it's ok after that. This error in the attached program always happens on
the first call in the higher priority task (started second.)

 

Running 2.4.5 with 2.6.26.3 and also 2.6.25.9. AMD Geode LX800 board.

 

Any suggestions?


Thanks,

Steven

 

 


[-- Attachment #1.2: Type: text/html, Size: 4698 bytes --]

[-- Attachment #2: double_test.cpp --]
[-- Type: application/octet-stream, Size: 931 bytes --]

#include <sys/mman.h>
#include <iostream>
#include <native/task.h>

static RT_TASK task,task2;

void func(void*)
{
    volatile double min = 10.0;
    volatile double val = 25.0;
    run[0] = true;
    
    for(;;)
    {
        if(val > min) {
            
        }
        else std::cout << "shouldn't see this " << min << ' ' << val << std::endl;
        
        rt_task_sleep(100000);
    }
    
}

void func2(void*)
{
    volatile double min = 5.0;
    volatile double val = 20.0;
    
    run[1] = true;
    
    for(;;)
    {
        if(val > min) {
            
        }
        else std::cout << "shouldn't see this " << min << ' ' << val << std::endl;
        
        rt_task_sleep(100000);
    }
}

int main()
{
    mlockall(MCL_CURRENT | MCL_FUTURE);
    
    rt_task_spawn(&task, "dummy", 40, 50, 0, func, 0);
    rt_task_spawn(&task2, "dummy2", 40, 60, 0, func2, 0);
    
    usleep(500000);
    
    return 0;
}

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2008-11-26 10:47 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03  0:35 [Xenomai-help] fpu context switch issue Steven Seeger
2008-11-03 10:10 ` Gilles Chanteperdrix
2008-11-03 14:21   ` Steven Seeger
2008-11-03 17:04     ` Gilles Chanteperdrix
2008-11-03 20:37       ` Mark Saiia
2008-11-04  8:30         ` Gilles Chanteperdrix
2008-11-08 16:56           ` Gilles Chanteperdrix
2008-11-11  0:07             ` Mark Saiia
2008-11-11 11:21               ` Gilles Chanteperdrix
2008-11-11 17:43                 ` Steven Seeger
2008-11-11 22:32                   ` Mark Saiia
2008-11-11 22:39                     ` Gilles Chanteperdrix
2008-11-13 11:11                     ` Gilles Chanteperdrix
2008-11-14  3:59                       ` Mark Saiia
2008-11-14  8:42                         ` Gilles Chanteperdrix
2008-11-17 17:27                           ` Mark Saiia
2008-11-17 18:54                             ` Steven Seeger
2008-11-19 18:51                             ` Steven Seeger
2008-11-20 12:43                               ` Gilles Chanteperdrix
2008-11-20 13:51                                 ` Steven Seeger
2008-11-21 17:03                                   ` Mark Saiia
2008-11-21 17:07                                     ` Gilles Chanteperdrix
2008-11-26 10:47                                       ` Gilles Chanteperdrix
2008-11-12 13:48                   ` Steven Seeger
2008-11-12 13:52                     ` Gilles Chanteperdrix
2008-11-12 13:53                       ` Steven Seeger
2008-11-04  9:55         ` Gilles Chanteperdrix
2008-11-04 15:38           ` Steven Seeger
2008-11-04 17:29             ` Mark Saiia
2008-11-04 18:59               ` Gilles Chanteperdrix
2008-11-04 19:01             ` Gilles Chanteperdrix
2008-11-04 21:29               ` Steven Seeger
2008-11-05 17:47                 ` Mark Saiia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.