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

>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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-29 17:09    [W:0.100 / U:21.808 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site