Subject: poll() on cdev implementation question
To: None <current-users@NetBSD.ORG>
From: Martin Husemann <martin@rumolt.teuto.de>
List: current-users
Date: 03/20/1997 07:21:15
I have a device driver for a character device.
It's xxxpoll() function uses (at least in my view) the generic code
that is used everywhere else (selrecord and selwakeup on a struct selinfo).
When doing a select() on this device, two of three cases do work as expected:
- when signalled, the select() returns -1 and erno = EINTR
- when data arrives, the select() returns > 0 and the appropriate bit
in fd_set is set
but when the timeout happens, select() should return 0 - but realy returns
something > 0. I'm sure no data arrived in the meantime... (yes, double-checked
that).
I tried select() on fd and it worked as expected, so there must be something
wrong inside my driver. How can I influence the return value from select()?
What am I doing wrong?
Martin