Re: SCHED_LOCK(9)?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oliver Gould
Date: Friday, April 20, 2007 - 8:26 pm

On 2007-04-20 23:12 -0500, Andrew Doran wrote:

Okay- I see now.  newlock2 must have been a afairly recent change (now
that I think about it, I remember seeing that thread).


kqemu_schedule() is more-or-less the old sys/kern/kern_synch.c:yield()-
except KQEMU wants to prioritize itself.  Eg:

  int
  kqemu_schedule(void)
  {
        struct lwp *l;
        int s;

        l =3D curlwp;

        s =3D SCHED_LOCK();
        l->l_priority =3D MAXPRI;
        l->l_stat =3D LSRUN;
        setrunqueue(l);
        l->l_proc->p_stats->p_ru.ru_nvcsw++;
        mi_switch(l, NULL);
        splx(s);

        return issignal(curlwp) !=3D 0;
  }


Will mimicking the new yield() work similarly?

  - Oliver
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
SCHED_LOCK(9)?, Oliver Gould, (Fri Apr 20, 1:05 pm)
Re: SCHED_LOCK(9)?, Tobias Nygren, (Fri Apr 20, 3:10 pm)
Re: SCHED_LOCK(9)?, Andrew Doran, (Fri Apr 20, 3:12 pm)
Re: SCHED_LOCK(9)?, Oliver Gould, (Fri Apr 20, 8:26 pm)
Re: SCHED_LOCK(9)?, Andrew Doran, (Sat Apr 21, 6:01 am)