高分求助:内核模块中的系统调用问题!

野草重新 2005-05-12 04:07:27
系统为redHat9.0,内核版本为2.4.20-8
程序文件为:
sys_call_read.c:
#define __KERNEL__
#define MODULE
#define __KERNEL_SYSCALLS__
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/unistd.h>
#include <linux/malloc.h>
#include <linux/vmalloc.h>
#include <asm-i386/uaccess.h>
#include <asm-i386/msr.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <asm/fcntl.h>
#include <asm/errno.h>
#include <linux/dirent.h>
#include <sys/mman.h>
#include <linux/string.h>
#include <linux/slab.h>
#include "params.h"


void ksys_print(char *name, unsigned long value)
{
printk("ksystime: %3li -- %s\n", value, name);
}

int init_module(void)
{
printk("hello,this is my own items\n");
mm_segment_t fs;
unsigned long ini, end, now, best, tsc;
int i;
char buffer[4];

#define measure_time(code) \
for (i = 0; i < NTRIALS; i++) { \
rdtscl(ini); \
code; \
rdtscl(end); \
now = end - ini; \
if (now < best) best = now; \
}

/* time rdtsc (i.e. no code) */
best = ~0;
measure_time( 0 );
tsc = best;
ksys_print("tsc", tsc);

/* time an empty read() */

fs=get_fs();
set_fs(get_ds());
best = ~0;
measure_time( read(0, buffer, 0) );
/* report data */
ksys_print("read()", best - tsc);
set_fs (fs);
return -EINVAL;
}

void cleanup_module(void)
{
}


params.h:

#ifndef NTRIALS
#define NTRIALS 100000
#endif

#ifndef READSIZE
#define READSIZE 128
#endif

#ifndef BUFSIZE
#define BUFSIZE 1024*1024
#endif

#ifndef FILENAME
#define FILENAME "/tmp/meg"
#endif

要实现的仅仅是在模块初始时候调用一个空的read()
编译总是出问题,请教
...全文
193 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
hantry 2005-05-21
  • 打赏
  • 举报
回复
要在内核模块中使用read函数需要外部system_call声明read函数
野草重新 2005-05-19
  • 打赏
  • 举报
回复
gcc -c -O2 -I/usr/src/linux-2.4.20-8/include -D MODULE -D__KERNEL__ -DLINUX read_modify.c

搞定
野草重新 2005-05-16
  • 打赏
  • 举报
回复
在注释掉主要操作后,仅仅编译头文件和空的模块构造析构函数,还是有很多错误,问题何在?
已没有找不到头文件问题
野草重新 2005-05-13
  • 打赏
  • 举报
回复
可否指明具体在哪里?如何解决?
sharkhuang 2005-05-13
  • 打赏
  • 举报
回复
没有路径
野草重新 2005-05-12
  • 打赏
  • 举报
回复
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:287: parse error before "pte_wrprotect"
/usr/include/asm/pgtable.h:287: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_wrprotect':
/usr/include/asm/pgtable.h:287: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:288: parse error before "pte_mkread"
/usr/include/asm/pgtable.h:288: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkread':
/usr/include/asm/pgtable.h:288: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:289: parse error before "pte_mkexec"
/usr/include/asm/pgtable.h:289: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkexec':
/usr/include/asm/pgtable.h:289: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:290: parse error before "pte_mkdirty"
/usr/include/asm/pgtable.h:290: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkdirty':
/usr/include/asm/pgtable.h:290: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:291: parse error before "pte_mkyoung"
/usr/include/asm/pgtable.h:291: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkyoung':
/usr/include/asm/pgtable.h:291: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:292: parse error before "pte_mkwrite"
/usr/include/asm/pgtable.h:292: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkwrite':
/usr/include/asm/pgtable.h:292: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:294: parse error before '*' token
/usr/include/asm/pgtable.h: In function `ptep_test_and_clear_dirty':
/usr/include/asm/pgtable.h:294: `ptep' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:295: parse error before '*' token
/usr/include/asm/pgtable.h: In function `ptep_test_and_clear_young':
/usr/include/asm/pgtable.h:295: `ptep' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:296: parse error before '*' token
/usr/include/asm/pgtable.h: In function `ptep_set_wrprotect':
/usr/include/asm/pgtable.h:296: `ptep' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:297: parse error before '*' token
/usr/include/asm/pgtable.h: In function `ptep_mkdirty':
/usr/include/asm/pgtable.h:297: `ptep' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:309: parse error before "pte_modify"
/usr/include/asm/pgtable.h:309: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_modify':
/usr/include/asm/pgtable.h:311: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h:311: `PTE_MASK' undeclared (first use in this function)
/usr/include/asm/pgtable.h:312: `newprot' undeclared (first use in this function)
In file included from sys_call_read.c:12:
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h: At top level:
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:24: parse error before "pgprot_t"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:28: parse error before "pgprot_t"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h: In function `vmalloc':
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:36: `GFP_KERNEL' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:36: `__GFP_HIGHMEM' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:36: `pgprot_t' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:36: parse error before "__ret"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:36: `__ret' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h: In function `vmalloc_dma':
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:45: `GFP_KERNEL' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:45: `GFP_DMA' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:45: `pgprot_t' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:45: parse error before "__ret"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:45: `__ret' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h: In function `vmalloc_32':
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:54: `GFP_KERNEL' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:54: `pgprot_t' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:54: parse error before "__ret"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:54: `__ret' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h: At top level:
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:61: parse error before "vmlist_lock"
/usr/src/linux-2.4.20-8/include/linux/vmalloc.h:61: warning: data definition has no type or storage class
In file included from sys_call_read.c:13:
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h: In function `verify_area':
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h:64: `current' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h: In function `__constant_copy_to_user':
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h:550: `current' undeclared (first use in this function)
In file included from sys_call_read.c:13:
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h: In function `__constant_copy_from_user':
/usr/src/linux-2.4.20-8/include/asm-i386/uaccess.h:558: `current' undeclared (first use in this function)
In file included from sys_call_read.c:16:
/usr/include/sys/types.h: At top level:
/usr/include/sys/types.h:41: conflicting types for `fsid_t'
/usr/include/asm/statfs.h:8: previous declaration of `fsid_t'
/usr/include/sys/types.h:62: conflicting types for `dev_t'
/usr/include/linux/types.h:10: previous declaration of `dev_t'
/usr/include/sys/types.h:67: conflicting types for `gid_t'
/usr/include/linux/types.h:21: previous declaration of `gid_t'
/usr/include/sys/types.h:72: conflicting types for `mode_t'
/usr/include/linux/types.h:12: previous declaration of `mode_t'
/usr/include/sys/types.h:77: conflicting types for `nlink_t'
/usr/include/linux/types.h:13: previous declaration of `nlink_t'
/usr/include/sys/types.h:82: conflicting types for `uid_t'
/usr/include/linux/types.h:20: previous declaration of `uid_t'
In file included from /usr/include/sys/types.h:133,
from sys_call_read.c:16:
/usr/include/time.h:104: conflicting types for `timer_t'
/usr/include/linux/timer.h:42: previous declaration of `timer_t'
In file included from /usr/include/sys/select.h:44,
from /usr/include/sys/types.h:216,
from sys_call_read.c:16:
/usr/include/time.h:119: redefinition of `struct timespec'
In file included from /usr/include/sys/select.h:46,
from /usr/include/sys/types.h:216,
from sys_call_read.c:16:
/usr/include/bits/time.h:70: redefinition of `struct timeval'
In file included from /usr/include/sys/types.h:216,
from sys_call_read.c:16:
/usr/include/sys/select.h:78: conflicting types for `fd_set'
/usr/include/linux/types.h:9: previous declaration of `fd_set'
sys_call_read.c: In function `init_module':
sys_call_read.c:56: `current' undeclared (first use in this function)
野草重新 2005-05-12
  • 打赏
  • 举报
回复
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:70: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `get_pgd_fast':
/usr/include/asm/pgalloc.h:80: `pgd_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:80: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:83: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `free_pgd_fast':
/usr/include/asm/pgalloc.h:85: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:90: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `free_pgd_slow':
/usr/include/asm/pgalloc.h:99: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:103: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_alloc_one':
/usr/include/asm/pgalloc.h:105: `pte_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:105: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:109: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:118: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_alloc_one_fast':
/usr/include/asm/pgalloc.h:127: `pte_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:127: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:130: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_free_fast':
/usr/include/asm/pgalloc.h:132: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:137: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_free_slow':
/usr/include/asm/pgalloc.h:139: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_mm':
/usr/include/asm/pgalloc.h:183: `current' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_page':
/usr/include/asm/pgalloc.h:190: dereferencing pointer to incomplete type
/usr/include/asm/pgalloc.h:190: `current' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_range':
/usr/include/asm/pgalloc.h:197: `current' undeclared (first use in this function)
In file included from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:9,
from sys_call_read.c:12:
/usr/include/asm/pgtable.h:17:24: asm/fixmap.h: 娌℃湁閭d釜鏂囦欢鎴栫洰褰?
In file included from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:9,
from sys_call_read.c:12:
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:24: parse error before "swapper_pg_dir"
/usr/include/asm/pgtable.h:24: `swapper_pg_dir' used prior to declaration
In file included from /usr/include/asm/pgtable.h:115,
from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:9,
from sys_call_read.c:12:
/usr/include/asm/pgtable-2level.h:32: parse error before "pgd"
/usr/include/asm/pgtable-2level.h:33: parse error before "pgd"
/usr/include/asm/pgtable-2level.h:34: parse error before "pgd"
/usr/include/asm/pgtable-2level.h:53: parse error before '*' token
/usr/include/asm/pgtable-2level.h:53: parse error before '*' token
/usr/include/asm/pgtable-2level.h: In function `pmd_offset':
/usr/include/asm/pgtable-2level.h:55: `pmd_t' undeclared (first use in this function)
/usr/include/asm/pgtable-2level.h:55: parse error before ')' token
In file included from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:9,
from sys_call_read.c:12:
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:277: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_read':
/usr/include/asm/pgtable.h:277: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:278: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_exec':
/usr/include/asm/pgtable.h:278: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:279: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_dirty':
/usr/include/asm/pgtable.h:279: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:280: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_young':
/usr/include/asm/pgtable.h:280: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:281: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_write':
/usr/include/asm/pgtable.h:281: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:283: parse error before "pte_rdprotect"
/usr/include/asm/pgtable.h:283: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_rdprotect':
/usr/include/asm/pgtable.h:283: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:284: parse error before "pte_exprotect"
/usr/include/asm/pgtable.h:284: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_exprotect':
/usr/include/asm/pgtable.h:284: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:285: parse error before "pte_mkclean"
/usr/include/asm/pgtable.h:285: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkclean':
/usr/include/asm/pgtable.h:285: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:286: parse error before "pte_mkold"
/usr/include/asm/pgtable.h:286: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_mkold':
/usr/include/asm/pgtable.h:286: `pte' undeclared (first use in this function)
/usr/include/asm/pgtable.h: At top level:
/usr/include/asm/pgtable.h:287: parse error before "pte_wrprotect"
/usr/include/asm/pgtable.h:287: parse error before "pte"
/usr/include/asm/pgtable.h: In function `pte_wrprotect':
/usr/include/asm/pgtable.h:287: `pte' undeclared (first use in this function)
野草重新 2005-05-12
  • 打赏
  • 举报
回复
调试信息如下:
[root@sleepjeep code]# gcc -c -O3 sys_call_read.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from sys_call_read.c:6:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from sys_call_read.c:6:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from sys_call_read.c:6:
/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
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from sys_call_read.c:6:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from sys_call_read.c:6:
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
In file included from sys_call_read.c:7:
/usr/include/linux/file.h: At top level:
/usr/include/linux/file.h:8: parse error before '(' token
/usr/include/linux/file.h:9: parse error before '(' token
/usr/include/linux/file.h: In function `get_close_on_exec':
/usr/include/linux/file.h:13: `current' undeclared (first use in this function)
/usr/include/linux/file.h:13: (Each undeclared identifier is reported only once
/usr/include/linux/file.h:13: for each function it appears in.)
/usr/include/linux/file.h:15: dereferencing pointer to incomplete type
/usr/include/linux/file.h:16: dereferencing pointer to incomplete type
/usr/include/linux/file.h:17: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `set_close_on_exec':
/usr/include/linux/file.h:23: `current' undeclared (first use in this function)
/usr/include/linux/file.h:24: dereferencing pointer to incomplete type
/usr/include/linux/file.h:26: dereferencing pointer to incomplete type
/usr/include/linux/file.h:28: dereferencing pointer to incomplete type
/usr/include/linux/file.h:29: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `fcheck_files':
/usr/include/linux/file.h:36: dereferencing pointer to incomplete type
/usr/include/linux/file.h:37: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `fcheck':
/usr/include/linux/file.h:47: `current' undeclared (first use in this function)
/usr/include/linux/file.h:49: dereferencing pointer to incomplete type
/usr/include/linux/file.h:50: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `__put_unused_fd':
/usr/include/linux/file.h:60: dereferencing pointer to incomplete type
/usr/include/linux/file.h:61: dereferencing pointer to incomplete type
/usr/include/linux/file.h:62: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `put_unused_fd':
/usr/include/linux/file.h:67: `current' undeclared (first use in this function)
/usr/include/linux/file.h:69: dereferencing pointer to incomplete type
/usr/include/linux/file.h:71: dereferencing pointer to incomplete type
/usr/include/linux/file.h: In function `fd_install':
/usr/include/linux/file.h:89: `current' undeclared (first use in this function)
/usr/include/linux/file.h:91: dereferencing pointer to incomplete type
/usr/include/linux/file.h:92: dereferencing pointer to incomplete type
/usr/include/linux/file.h:94: dereferencing pointer to incomplete type
/usr/include/linux/file.h:95: dereferencing pointer to incomplete type
In file included from sys_call_read.c:11:
/usr/include/linux/malloc.h:3:2: warning: #warning The Use of linux/malloc.h is deprecated, use linux/slab.h
In file included from /usr/include/linux/highmem.h:5,
from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:8,
from sys_call_read.c:12:
/usr/include/asm/pgalloc.h:6:24: asm/fixmap.h: 娌℃湁閭d釜鏂囦欢鎴栫洰褰?
In file included from /usr/include/linux/highmem.h:5,
from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:8,
from sys_call_read.c:12:
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:57: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `get_pgd_slow':
/usr/include/asm/pgalloc.h:59: `pgd_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:59: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:59: parse error before ')' token
/usr/include/asm/pgalloc.h:62: `USER_PTRS_PER_PGD' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:63: `swapper_pg_dir' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:63: `PTRS_PER_PGD' undeclared (first use in this function)

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧