Re: poll

From: Ben Greear
Date: Thu Jun 17 2004 - 21:25:30 EST


Richard B. Johnson wrote:
On Thu, 17 Jun 2004, Ben Greear wrote:


Richard B. Johnson wrote:

Hello,
Is it okay to use the 'extra' bits in the poll return value for
something? In other words, is the kernel going to allow a user-space
program to define some poll-bits that it waits for, these bits
having been used in the driver?

Can't you just do a read and determine from the results of the read
what you actually got? If not, add framing to your message so that
you *CAN* determine one message type from another...

Ben



The mailbox read(s) is/are 32-bit int(s). There is no way to identify
it as being "new" or something that was written two weeks ago.
That's why we use poll. Poll says 'I got something new for you'.

Then use 3 different file descriptors to poll/read. That seems more
efficient anyway as it doesn't wake the folks who don't care.

Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/