⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idt.cc

📁 Murphy 大俠 GPL 的 C++/x86 RTOS, 支持 MMU, 用戶/核心 模式區隔. http://hpc.ee.ntu.edu.tw/~murphy/me/EKernel.html
💻 CC
字号:
// File: IDT.cc
//
// 1998/12/03: (Murphy)
//	Implement a class interface for interrupt descriptor table.
//	Use codes from oskit-0.6.

#include "IDT.h"

void IDT::GateInit(const struct gate_init_entry *src)
{
	assert(m_gateIDT);

	// Initialize the trap/interrupt vectors from the trap_inittab.
	while (src->entrypoint)
	{
		fill_gate(&m_gateIDT[src->vector], src->entrypoint,
			      KERNEL_CS, src->type, 0);
		src++;
	}
}



void IDT::SetIDT(WORD nVector, DWORD nEntryPoint, WORD nType)
{
	assert(nVector<IDT_SIZE);

	fill_gate(&m_gateIDT[nVector], nEntryPoint, KERNEL_CS, nType, 0);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -