Re: Does the kernel supports floating point operations?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Fri, 2005-11-04 at 10:19 +0000, dileep reddy wrote:
> > Hi,
> >    As my subject says, is that supported? I am writing
> > a kernel module which extensively uses floating point
> > operations. One of the books I went through, mentioned
> > that all C types are supported in kernel. But which
> > format character is used to print those floting point
> > values. When I use %f in printk(), it is printing %f
> > as it as on the screen.
> >   Can anyone suggest me a way?

Ming Zhang wrote:
> u can read other books. like linux kernel development or linux device
> driver, they will tell u that do not do float computation in kernel.

It is possible to use the floating point unit in kernel, but only in
special circumstances.  Look to the MMX-using code to see how it's done.

Ordinarily, the floating point C types, and operations, are not
supported in kernel code and if you try them and they seem to work,
what's really happening is corrupting user-space data.  That's a bad thing.

-- Jamie

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux