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

Method initialize

lab8/src/3/src/kernel/syscall.cpp:13–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

memsetFunction · 0.50

Tested by

no test coverage detected