Skip to contentSkip to conversation

FPU not available in user-space programs

Xenomai-help Rodrigo Rosenfeld Rosas 3 participants 6 messages Jul 6, 2006 – Jul 10, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I was looking at /proc/xenomai/faults and noticed that the only errors were on TRAP 7 (FPU not available).

Each time I run the user-space program using the native skin, I increment the fault by one. I don't understand why this happens. From documentation, FPU should be enabled automatically for user-space programs.

Any ideas why I'm getting this error and what does it mean? Should I do some float-point operation before creating my real-time tasks?

Thanks in advance,

Rodrigo.

_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/

#1 lore raw
Quoted 5 lines · Rodrigo Rosenfeld Rosas

Hi,

I was looking at /proc/xenomai/faults and noticed that the only errors were on TRAP 7 (FPU not available).

Quoted 7 lines

Each time I run the user-space program using the native skin, I increment the fault by one. I don't understand why this happens. From documentation, FPU should be enabled automatically for user-space programs.

Any ideas why I'm getting this error and what does it mean? Should I do some float-point operation before creating my real-time tasks?

Watch out for the thread "T_FPU without effect" on xenomai-core, I stumbled over this some time ago as well. It's an initial fault that happens only on first FPU usage from user-space.

I'm not up-to-date with its current state, i.e. if there are plans to solve this differently. Maybe Gilles or Philippe can comment on it.

Jan

#2 lore raw
In reply to Rodrigo Rosenfeld Rosas
Quoted 11 lines · Rodrigo Rosenfeld Rosas

Hi,

I was looking at /proc/xenomai/faults and noticed that the only errors were on TRAP 7 (FPU not available).

Each time I run the user-space program using the native skin, I increment the fault by one. I don't understand why this happens. From documentation, FPU should be enabled automatically for user-space programs.

Any ideas why I'm getting this error and what does it mean? Should I do some float-point operation before creating my real-time tasks?

This fault is not an error, it happens when a task use the FPU for the first time in primary mode. When in secondary mode, such an FPU fault happens every time the FPU is used after a context switch, you simply do not know about it because it is not accounted for.

Signature · 1 line
					    Gilles Chanteperdrix.
#3 lore raw

Thank you Gilles and Jan,

Jan, I had taken a look at that thread just after I created this thread.

Well, at least, now I know this fault is expected and is not an error.

Do I need to make a dummy float-point operation in primary mode for avoiding unexpected higher latency for enabling FPU in critical code?

Thank you for your support. I must enforce that this list has the best support I've seen. I posted a question on Doxygen's user list a few days ago and just one user answered to it, but not really solved what I was asking...

By the way, does someone here know how can I put comment code on documentation, as in:
/*! ...
\code /* this is a comment */ \endcode */

Of course this won't compile. The user suggests to put the above code inside a #ifdef __COMMENT__ and define it on Doxyfile, but that makes the code seem ugly in kdevelop, besides causing a compiler warning:

warning: "/*" within comment

Is there a cleaner way to make possible to put comments inside the @code command?

I hope you can help me once more this time... ;)

Thanks,

Rodrigo.

____________________________________________________________
Em Quinta 06 Julho 2006 08:33, Gilles Chanteperdrix escreveu:

Quoted 11 lines
Quoted 10 lines · Rodrigo Rosenfeld Rosas

Hi,

I was looking at /proc/xenomai/faults and noticed that the only errors were on TRAP 7 (FPU not available).

Each time I run the user-space program using the native skin, I increment the fault by one. I don't understand why this happens. From documentation, FPU should be enabled automatically for user-space programs.

Quoted 7 lines
Quoted 2 lines

Any ideas why I'm getting this error and what does it mean? Should I do some float-point operation before creating my real-time tasks?

This fault is not an error, it happens when a task use the FPU for the first time in primary mode. When in secondary mode, such an FPU fault happens every time the FPU is used after a context switch, you simply do not know about it because it is not accounted for.

_______________________________________________________
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/

#4 lore raw
Quoted 2 lines · Rodrigo Rosenfeld Rosas

Is there a cleaner way to make possible to put comments inside the @code command?

What about putting the commented code in a separate file and including it with \include ?

Signature · 1 line
					    Gilles Chanteperdrix.
#5 lore raw

Re: [Xenomai-help] FPU not available in user-space programs [Doxygen]

Gilles Chanteperdrix escreveu:

Quoted 7 lines
Quoted 2 lines · Rodrigo Rosenfeld Rosas

Is there a cleaner way to make possible to put comments inside the @code command?

What about putting the commented code in a separate file and including it with \include ?

That is a good idea, but it does not worth in my case, since the code is too small.

But thanks for the suggestion.

Rodrigo.

_______________________________________________________ Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/