There is a flag the scheduler keeps on the current task you can test
to see if it thinks you should by now have given up the CPU. So providing
you put it somewhere that sleeping is ok (eg by the copy from user)
then
if(current->need_resched)
schedule();
should do the trick
-
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/