Hello,
>>
>>I have found out that when linking a userspace application with -lpthread, 
>>then for some reason, a device driver's read() routine suddenly has 
>>IO_NDELAY set in flags. Bug?
>
>No. This is as it should be, because -lpthread does threads in *one*
>kernel process, so it has to intercept blocking operations so it can
>switch to another thread instead, or call select/poll/kevent if needed,
>so not all threads hang if *one* executes a blocking operation.
>
How could I help the high CPU usage then? The device driver read 
routine always prematurely exits because IO_NDELAY is set (and
there's nothing to read - so EWOULDBLOCK is returned).


Jan Engelhardt
-- 

Reply via email to