fix: corrections...erreur lors du switch vers la tache de tid 1.1 dans restcpu_kernel

This commit is contained in:
Nicolas Hordé 2018-12-19 23:31:13 +01:00
parent 11428c2415
commit 74b0b4e2e9
2 changed files with 4 additions and 2 deletions

View File

@ -342,7 +342,7 @@ void virtual_pd_page_add(pd * dst, u8 * vaddr, u8 * paddr, u32 flags)
if (dst == NULL)
if (vaddr > (u8 *) USER_CODE)
{
print("ERREUR: Adresse %X n'est pas dans l'espace noyau !\n", vaddr);
printf("ERREUR: Adresse %X n'est pas dans l'espace noyau !\n", vaddr);
return;
}
pdir = (u32 *) (0xFFFFF000 | (((u32) vaddr & 0xFFC00000) >> 20));

View File

@ -77,7 +77,7 @@ END */
void processexit(void)
{
deleteprocess(getcurrentpid());
switchtask(maketid(0,0));
switchtask(maketid(1,1));
}
/*******************************************************************************/
@ -160,6 +160,7 @@ void initprocesses(void)
aprocess->result = 0;
aprocess->status = PROCESS_STATUS_READY;
aprocess->iskernel = true;
TAILQ_INIT(&aprocess->task_head);
current=createtask(pid,getinitretry(),true);
}
@ -257,6 +258,7 @@ void switchtask(tid_t tid)
if (atask==NULL) return;
process *aprocess=findprocess(tid.pid);
if (aprocess==NULL) return;
current = tid;
if (!aprocess->iskernel)
setTSS(atask->kernel_stack.ss0, atask->kernel_stack.esp0);
else