OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [support/] [sched.c] - Diff between revs 1688 and 1689

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1688 Rev 1689
Line 95... Line 95...
  }
  }
  scheduler.job_queue = NULL;
  scheduler.job_queue = NULL;
  sched_guard(NULL);
  sched_guard(NULL);
}
}
 
 
 
/* Executes jobs in time queue */
 
void do_scheduler(void)
 
{
 
  struct sched_entry *tmp;
 
 
 
  /* Execute all jobs till now */
 
  do {
 
    tmp = scheduler.job_queue;
 
    scheduler.job_queue = tmp->next;
 
    tmp->next = scheduler.free_job_queue;
 
    scheduler.free_job_queue = tmp;
 
 
 
    scheduler.job_queue->time += tmp->time;
 
 
 
    tmp->func (tmp->param);
 
  } while(scheduler.job_queue->time <= 0);
 
}
 
 
static void sched_print_jobs(void)
static void sched_print_jobs(void)
{
{
  struct sched_entry *cur;
  struct sched_entry *cur;
  int i;
  int i;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.