mirror of
https://git.nju.edu.cn/oslab2023/oslab.git
synced 2024-06-13 04:44:31 +08:00
21 lines
442 B
C
21 lines
442 B
C
#ifndef __CTE_H__
|
|
#define __CTE_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
// TODO: Lab1-5 adjust the struct to the correct order
|
|
// TODO: Lab1-6 add esp and ss
|
|
typedef struct Context {
|
|
uint32_t eax, ebx, ecx, edx, esi,
|
|
edi, ebp, eip, cs, ds,
|
|
eflags, irq, errcode;
|
|
} Context;
|
|
|
|
void init_cte();
|
|
void irq_iret(Context *ctx) __attribute__((noreturn));
|
|
|
|
void do_syscall(Context *ctx);
|
|
void exception_debug_handler(Context *ctx);
|
|
|
|
#endif
|