linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "David Härdeman" <david@hardeman.nu>
Cc: linux-input@vger.kernel.org
Subject: Re: Two questions regarding evdev
Date: Wed, 24 Mar 2010 14:41:48 -0700	[thread overview]
Message-ID: <201003241441.48437.dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20100324205332.GA7303@hardeman.nu>

Hi David,

On Wednesday 24 March 2010 01:53:32 pm David Härdeman wrote:
> I've been going over the evdev (drivers/input/evdev.c) code since I'm
> using it as inspiration for a small project I'm hacking on. So far I
> have two questions with regard to the code:
> 
> First, evdev_event passes a new event to all connected clients (writing
> it to each client's event fifo) and then calls wake_up_interruptible.
> However, given that all clients will have at least one new event to read
> after evdev_event is done, shouldn't wake_up_interruptible_all be called
> instead?

wake_up() vs. wake_up_all() only matters if there is exclusive waiters
which evdev does not use. PLease see comment/explanation for wake up
here:

	http://lxr.linux.no/linux+v2.6.33/kernel/sched.c#L5685

> 
> Second, evdev_poll never sets the POLLOUT flag, but evdev can accept
> writes (which will be passed to input_inject_event), so shouldn't the
> POLLOUT flag always be set?

We could but I guess nobody tries to pull evdev for writing, everyone
is interested in reading. 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-03-24 21:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 20:53 Two questions regarding evdev David Härdeman
2010-03-24 21:41 ` Dmitry Torokhov [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=201003241441.48437.dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=david@hardeman.nu \
    --cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).