idt.cc

来自「Murphy 大俠 GPL 的 C++/x86 RTOS, 支持 MMU, 用戶」· CC 代码 · 共 30 行

CC
30
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?