Draft: lab 5 failed

This commit is contained in:
2025-05-03 20:45:34 +08:00
parent 981cae803b
commit e73f90395d
39 changed files with 588 additions and 429 deletions

View File

@@ -2,6 +2,7 @@
#include <stddef.h>
#include <queue.h>
#include <process.h>
typedef int32_t (*thread_func_t)(uint64_t);
@@ -20,21 +21,21 @@ typedef struct {
uint64_t x27, x28;
uint64_t fp, lr;
uint64_t sp;
uint64_t sp_el0;
uint64_t elr_el1;
} cpu_state_t;
typedef struct {
typedef struct thread {
thread_func_t func;
uint64_t param;
thread_status_t status;
int32_t retcode;
void *stack_pointer;
void *stack;
size_t stack_size;
cpu_state_t regs;
cpu_state_t *regs;
process_t *process;
} thread_t;
// thread.S