MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / initialize

Method initialize

lab8/src/6/src/kernel/syscall.cpp:14–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14void SystemService::initialize()
15{
16 memset((char *)system_call_table, 0, sizeof(int) * MAX_SYSTEM_CALL);
17 // 代码段选择子默认是DPL=0的平坦模式代码段选择子,DPL=3,否则用户态程序无法使用该中断描述符
18 interruptManager.setInterruptDescriptor(0x80, (uint32)asm_system_call_handler, 3);
19}
20
21bool SystemService::setSystemCall(int index, int function)
22{

Callers

nothing calls this directly

Calls 2

memsetFunction · 0.50

Tested by

no test coverage detected