예제 #1
0
void clock_routine() {
user_to_system(&(current()->st));
 zeos_show_clock();
 ++zeos_ticks;
 update_sched_data_rr();
 if (needs_sched_rr()){
   update_current_state_rr(&readyqueue);////////////modificar quan fem exit (ready or free)???
   sched_next_rr();
 }
system_to_user(&(current()->st));
}
예제 #2
0
파일: sys.c 프로젝트: chuckleplant/ZeOS
void sys_exit()
{  
/*
a) Free the data structures and resources of this process (physical memory, task_struct,
   and so). It uses the free_frame function to free physical pages.
b) Use the scheduler interface to select a new process to be executed and make a context
   switch.*/
  update_user_to_system();   
  free_user_pages(current());  
	update_current_state_rr(&freequeue);
	sched_next_rr();                                 
}