Draft: lab 5 failed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user