Re: sleep_on, wake_up question

wingel@t1.ctrl-c.liu.se
30 Dec 1999 19:27:27 -0000


Dick Johnson Wote:
>If I do:
>
> for(;;)
> ;
>
>-- never returning, in an ioctl(), the box doesn't hang, it just gets
>very slow. Context switches are occurring. Or have I been using a
>SMP machine too long?

You have been using a SMP machine too long. In kernel space, Linux
only does cooperative multitasking, and the only way to switch process
contexts is through schedule or one of the functions that call schedule
such as sleep_on or the semaphore functions.

/Christer

-- 
"Just how much can I get away with and still go to heaven?"

- 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/