Exemple #1
0
int
sys_waitx(int *wtime, int *rtime)
{
  int a,b;
  int a1,b1;
  argint(0,&a);
  fetchint(a,&a1);
  argint(1,&b);
  fetchint(b,&b1);
  //cprintf("%d %d\n", a1,b1);
  //cprintf("%d %d\n",cpu->proc->rtime,cpu->proc->iotime);
  int totTime=cpu->proc->rtime;
  cprintf("%d MY\n", cpu->proc->pid);
  int totSleepTime=cpu->proc->iotime;
  setint(a,&totTime);
  setint(b,&totSleepTime);
  //cprintf("HI");
  return wait();
}
Exemple #2
0
int
sys_set_priority(int *newprio)
{
  int oldPrio=cpu->proc->priority;
  int val,addr;
  argint(0,&addr);
  fetchint(addr,&val);
  cpu->proc->priority=val;
  if(val>oldPrio){
    yield();
  }
  return oldPrio;
}
Exemple #3
0
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
  return fetchint(proc->tf->esp + 4 + 4*n, ip);
}
Exemple #4
0
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
  return fetchint(cp, cp->tf->esp + 4 + 4*n, ip);
}
Exemple #5
0
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
  return fetchint(curr_proc->tf->sp + 4*n, ip);
}
Exemple #6
0
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
  int x = fetchint(proc, proc->tf->esp + 4 + 4*n, ip);
  return x;
}
Exemple #7
0
int argint(int n, int *ip)
{
    return fetchint(current_proc, current_proc->regs->useresp + 4 +4*n, ip);
}