Date: Wed, 05 Aug 1998 09:51:58 -0400 From: "Brian J. McGovern" <mcgovern@spoon.beta.com> To: hackers@FreeBSD.ORG Subject: select() problem with new device driver... Message-ID: <199808051351.JAA28675@spoon.beta.com>
next in thread | raw e-mail | index | archive | help
I could probably figure this out with another day of dinking with DDD, but I'm sure someone on -hackers will have a quick answer. In an application, I'm opening up several device descriptors to modem ports (writing the driver for myself, as they're not 'normal' modems). I use the standard macros FD_ZERO, and FD_SET to zero my descriptor set, then set the bits. I the make a select() call with a NULL (no) timeout. When input comes in on a modem, I call ttwakeup in the driver, which appears to get around to calling selwakeup() to wake up anything sleeping on the read side. The _problem_ appears to be that between FD_ZERO, FD_SET, and the upper half of select() (I think its the latter), the t_rsel.si_pid isn't being set (its 0 when I look at it in the driver), and it appears selwakeup() needs a non-zero value in order to actually do anything. I suspect that this field not being set is due to something stupid I'm not doing in the driver, such as setting one of the TS_ flags in the t_state field, but I've yet to be able to find the portion of select() that actually handles this, so I can see what conditions it wants to proceed. Can anyone give me a pointer? Thanks. -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808051351.JAA28675>