X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/69777bdcab284335651a8002e2896f3862fa423d..1025235c72c31f7fa7b648c0e32ddcaa68a8f66a:/lunaix-os/includes/lunaix/process.h diff --git a/lunaix-os/includes/lunaix/process.h b/lunaix-os/includes/lunaix/process.h index f4a526f..fe33fa2 100644 --- a/lunaix-os/includes/lunaix/process.h +++ b/lunaix-os/includes/lunaix/process.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include @@ -60,7 +60,7 @@ struct proc_sig int sig_num; void* sigact; void* sighand; - isr_param* saved_ictx; + struct hart_state* saved_hstate; } __attribute__((packed)); @@ -81,7 +81,7 @@ struct thread */ struct { - isr_param* intr_ctx; + struct hart_state* hstate; ptr_t ustack_top; }; // *critical section @@ -133,7 +133,7 @@ struct proc_info }; struct proc_mm* mm; - struct sigregister* sigreg; + struct sigregistry* sigreg; struct v_fdtable* fdtable; struct v_dnode* cwd; struct { @@ -182,6 +182,13 @@ vmregions(struct proc_info* proc) return proc ? &proc->mm->regions : NULL; } + +static inline unsigned int +procvm_asid(struct proc_mm* mm) +{ + return mm->proc->pid; +} + static inline void block_current_thread() { @@ -344,7 +351,7 @@ thread_release_mem(struct thread* thread); static inline struct sigact* active_signal(struct thread* thread) { struct sigctx* sigctx = &thread->sigctx; - struct sigregister* sigreg = thread->process->sigreg; + struct sigregistry* sigreg = thread->process->sigreg; return sigreg->signals[sigctx->sig_active]; }