lkml.org 
[lkml]   [2006]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Float numbers in module programming
beware wrote:

>Hi
>
>i wonder if it is available to use float numbers in a module programming.
>Because, when I'm look for the param_get functions, i find them only
>for integers (long, short, and others) but none for the float numbers.
>
>Thanks for yours answer.
>
>
The short answer is no, don't bother.

If you touch the floating point registers in kernel code, then
you mess them up for any user program that use floating point.

It can be done, but then you have to take all sorts of precations
saving the registers before using them, and restoring them
when finished. And you must prevent context switching
while you have them!

If you need a few computations, try to do it with fixed point
instead if at all possible. Or emulate floating point,
or have a userspace helper app to do it.
It all depends on what you think you need floats for.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-29 17:09    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site