sched: thread: add cpu context pointer usable during interrupts and syscalls

This commit is contained in:
2026-04-01 18:22:23 +01:00
parent 7bcd1577be
commit 876f91d8be
2 changed files with 19 additions and 0 deletions
+5
View File
@@ -8,6 +8,8 @@
#define THREAD_KSTACK_ORDER VM_PAGE_4K
struct ml_cpu_context;
enum thread_state {
THREAD_READY = 1,
THREAD_SLEEPING = 2,
@@ -39,6 +41,9 @@ struct thread {
virt_addr_t tr_ip, tr_sp, tr_bp;
virt_addr_t tr_cpu_user_sp, tr_cpu_kernel_sp;
/* only valid within an interrupt or syscall context */
struct ml_cpu_context *tr_irqctx;
struct ml_thread tr_ml;
struct runqueue *tr_rq;