如何包含 math.h #include <math.h>在内核源文件上? [英] How to include math.h #include &lt;math.h&gt; on kernel source file?

查看:44
本文介绍了如何包含 math.h #include <math.h>在内核源文件上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 math.h 包含在我的 Linux 内核模块中.如果我使用,

I am trying to include math.h in my Linux kernel module. If I use,

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

它给了我这些错误:

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

这是为什么?

推荐答案

在专家看来,它不是在内核空间和用户空间之间通信数据的好方法.要么完全在内核空间上工作,要么只在用户空间上工作.

In experts view , its NOT a good approach to communicate data between kernel space and user space. Either fully work on kernel space OR only on user space.

但是一种解决方案可以,在内核模块中使用read()write()命令在用户空间和内核空间之间发送信息.

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

这篇关于如何包含 math.h #include <math.h>在内核源文件上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆