多谢support. RedHat 9 下一个示例文件和编译命令及结果:
#include <asm/system.h>
int main (void)
{
int i=0;
local_irq_disable();
i++;
local_irq_enable();
return 0;
}
[root@localhost dsp]# gcc -o irq irq.c
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from irq.c:1:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
编译命令需要加什么选项?