mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Ben Greear <greearb@candelatech.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: poll
Date: Fri, 18 Jun 2004 07:22:40 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0406180715200.4952@chaos> (raw)
In-Reply-To: <40D25247.3050509@candelatech.com>

On Thu, 17 Jun 2004, Ben Greear wrote:

> 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

Huh??  The driver has no clue what open file-descriptor needs
whatever special handling. When a polled-for event occurs, a
bit is put into what will be the poll return value in the driver
and any process sleeping in poll ** that is waiting for that bit **
gets awakened. That's why I need to use some of the "spare" bits.
Only the task that's waiting for its specific bit gets awakened
in user-mode.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
            Note 96.31% of all statistics are fiction.



      reply	other threads:[~2004-06-18 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-17 14:05 poll Richard B. Johnson
2004-06-17 22:34 ` poll Ben Greear
2004-06-18  0:19   ` poll Richard B. Johnson
2004-06-18  0:32     ` poll Davide Libenzi
2004-06-18  0:42       ` poll Richard B. Johnson
2004-06-18  2:24     ` poll Ben Greear
2004-06-18 11:22       ` Richard B. Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0406180715200.4952@chaos \
    --to=root@chaos.analogic.com \
    --cc=greearb@candelatech.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®