关于cpu_gdt_table[GDT_ENTRIES]的问题

orclc 2005-08-03 03:23:15
我在程序了作了如下声明:
extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];

编译时出错,错误信息为:
array type has incomplete element type

这是为什么啊?
...全文
78 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
A guide to how the FreeBSD kernel manages the IA32 processors in Protected Mode (c) 2004, Arne Vidstrom, http://vidstrom.net Version 1.0 : 2004-06-17 Table of contents 1. P REREQUISITE KNOWLEDGE ....................................................................................2 2. I NFORMATION SOURCES ..........................................................................................2 3. T HE I NTERRUPT D ESCRIPTOR T ABLE (IDT)............................................................2 3.1 The IDT definition............................................................................................2 3.2 Setting entries in the IDT.................................................................................3 3.3 A look inside the IDT with KernView ..............................................................4 3.4 Making the IDT active .....................................................................................5 4. S YSCALL HANDLING ...............................................................................................6 4.1 The INT 0x80 interrupt handler.......................................................................6 4.2 Syscall dispatching...........................................................................................8 4.3 The copyin() function.....................................................................................10 5. T HE G LOBAL D ESCRIPTOR T ABLE (GDT).............................................................12 5.1 The GDT definition........................................................................................12 5.2 Setting up the descriptors in the GDT............................................................13 5.3 Making the GDT active..................................................................................16 5.4 A look inside the GDT with KernView...........................................................17 5.5 Segment selector values in an ordinary user mode program ........................21 6. T ASK SWITCHING ..................................................................................................22 6.1 The cpu_switch() function..............................................................................22 7. V IRTUAL PAGING ..................................................................................................29 7.1 The page fault handler...................................................................................29 7.2 Virtual paging and task switching.................................................................32 8 T HE L OCAL D ESCRIPTOR T ABLE (LDT).................................................................32 8.1 A quick glance at the LDT .............................................................................32 9. M ISCELLANEOUS ..................................................................................................34 9.1 The uiomove() function..................................................................................34 1. Prerequisite knowledge This guide assumes that the reader is familiar with how the IA32 processors work in Protected Mode, with the C programming language, and with AT&T syntax IA32 assembler programming. It also assumes some knowledge about user mode system programming for FreeBSD and some general knowledge about the internal workings of the kernel. 2. Information sources The primary source of information used when writing this guide has been the FreeBSD kernel source code itself. The FreeBSD Kernel Cross-Reference at http://fxr.watson.org/ has been very valuable for doing easy searches in the kernel source code, but the source code snippets in the text comes from the /usr/src directory tree on a FreeBSD 4.9 installation. Also, the book The Design and Implementation of the 4.4 BSD Operating System, by McKusick / Bostic / Karels / Quarterman, was very useful as a general kernel overview. The references used for IA32 information are the IA-32 Intel Architecture Software Developer’s Manual from Intel, and the book Protected Mode Software Architecture

4,441

社区成员

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

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