oslab/kernel/include/cte.h
2023-02-11 16:48:16 +08:00

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