[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] vim slow



On 30/09/14 08:56, Miro Kropáček wrote:

On Tue, Sep 30, 2014 at 9:54 AM, Alan Hourihane <alanh@fairlite.co.uk> wrote:
as 0 means unlimited

But 0 shouldn't be interpreted as 'unlimited', rather than 'return immediately':

The timeout argument specifies the minimum number of milliseconds that poll() will block. (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount.) Specifying a negative value in timeoutmeans an infinite timeout. Specifying a timeout of zero causes poll() to return immediately, even if no file descriptors are ready.

It's how the system call is implemented, not specifically how poll works.

That's why the system call modifies 0 to become 1. And that's also why I say when it is 0, to return without the timeout.

Alan.