X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/92f6e64a6da763c45ff9f4ab5eafcab3d8766dcb..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/arch/i386/proc.c?ds=sidebyside diff --git a/lunaix-os/arch/i386/proc.c b/lunaix-os/arch/i386/proc.c deleted file mode 100644 index 565d258..0000000 --- a/lunaix-os/arch/i386/proc.c +++ /dev/null @@ -1,35 +0,0 @@ -#include - -#include -#include - -volatile struct x86_tss _tss = { .link = 0, - .esp0 = KERNEL_STACK_END, - .ss0 = KDATA_SEG }; - -void -proc_init_transfer(struct proc_info* proc, - ptr_t stack_top, - ptr_t target, - int flags) -{ - struct exec_param* execp = - (struct exec_param*)(stack_top - sizeof(struct exec_param)); - isr_param* isrp = (isr_param*)((ptr_t)execp - sizeof(isr_param)); - - *execp = (struct exec_param){ - .cs = KCODE_SEG, .ss = KDATA_SEG, .eip = target, .eflags = cpu_ldstate() - }; - - *isrp = (isr_param){ .registers = { .ds = KDATA_SEG, - .es = KDATA_SEG, - .fs = KDATA_SEG, - .gs = KDATA_SEG }, - .execp = execp }; - - if ((flags & TRANSFER_IE)) { - execp->eflags |= 0x200; - } - - proc->intr_ctx = isrp; -} \ No newline at end of file