Messages in this thread | | | Date | Wed, 29 Mar 2006 17:07:16 +0200 | From | Helge Hafting <> | Subject | Re: 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/
| |