linux-kernel - _NR在系统调用号码中代表什么?通常用作后缀

标签 linux-kernel kernel system-calls

谁能告诉我NR代表什么?
例如:
#定义_NR_exit

我到处都在找,但找不到答案。

最佳答案

这可以追溯到Linux 0.01(请参阅 include/unistd.h )。

该行在 kernel/system_call.s 中:

nr_system_calls = 67

include/linux/sched.h 具有:
#define NR_TASKS 64

include/linux/fs.h 还有一堆其他的NR_xxx常量。

在所有这些情况下,“nr”显然是“number”的缩写。

我认为这是Mircea Gherzan关于“难道不是NumbeR”的猜测的有力证据。在上面的评论中是正确的。

关于linux-kernel - _NR在系统调用号码中代表什么?通常用作后缀,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8306202/

相关文章:

linux - 分析系统调用

linux - 为不同的 block 设备使用不同的 Linux I/O 调度器

linux - Linux 驱动程序中的 platform_get_resource 是什么?

c++ - C++ 中的虚拟网络摄像头

c - 即使所有管道都已关闭,程序仍想获取输入

c - 如何解码Linux中系统调用的输入标志?

c - c 中的简单 shell : waitpid system call not working

linux - 我在哪里可以获得 linux 内核的 api,它可以让我访问内核中的信息

linux - 理解/boot/config文件

kernel - fatal error : openssl/bio. h:没有这样的文件或目录