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