How to include math.h #include <math.h> in the kernel source file?

I am trying to include math.h in my linux kernel module. If i use

#include '/usr/include/math.h'

This gives me the thesis of errors:

error: features.h: No such file or directory
error: bits/huge_val.h: No such file or directory
error: bits/mathdef.h: No such file or directory
error: bits/mathcalls.h: No such file or directory

Why is this?

+5
source share
11 answers

According to experts, this is NOT a good approach to transferring data between kernel space and user space. Either fully work on kernel space, or only in user space.

But one solution can use the read () and write () commands in the kernel module to send information between user space and kernel space.

-1
source

C , .

+9

. libc, libm .. , . , , , , .

, ​​ FPU. ( FPU ). FPU , , , FPU .

: FPU , .

+4

. , . ​​ , , . , , , .

:

  • , ​​ .
  • .
  • .
+2

AFAIK , . /usr/include .

+1

, . , , .

.

+1

C . , C .

( ) --- > C ( )

                                       |

                                   <---|

, . C ( )

: HID- ( x, y). , , , , (pow, tan ..).

, hid-input.c . -

.

0

, , , , , ...

0

(, - , ) , , , , "" . . . , math.h . ...

, , , . API math.h (soft-float) . soft-float.

math.h, glibc uClibc , , . "C" libm, math.h .

uClibc: libm uClibc.

glibc: "git" - glibc , glibc/sysdeps/ieee754/flt-32.

glibc , , uClibc ( ) C89 math.h. (: ) , C99 +, glibc.

0

, (") ?

-1

All Articles