void trampoline(void (*func)(void *), struct thr_data *thr)
{
if (thr->scheduler) {
struct sched_param p = { sched_priority: thr->sched_pri };
thr->setuperr = sched_setscheduler(getpid(), thr->scheduler, &p);
if (thr->setuperr < 0) {
_exit(-1)
}
}
func(thr->data);
..
}
Manager checks thr->setuperr after waitpid().
The thread itself never runs when it fails.
-Andi
P.S.: What do you think about the cmpxchg emulation in kernel idea to speed up
the mutexes?
-- This is like TV. I don't like TV.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/