All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Andy Walls <awalls@radix.net>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	iivanov@mm-sol.com, hverkuil@xs4all.nl,
	gururaj.nagendra@intel.com
Subject: Re: [RFC v2 4/7] V4L: Events: Add backend
Date: Wed, 23 Dec 2009 12:15:45 +0200	[thread overview]
Message-ID: <4B31EDD1.9010701@maxwell.research.nokia.com> (raw)
In-Reply-To: <1261530062.3161.29.camel@palomino.walls.org>

Hi Andy,

Andy Walls wrote:
>> +int v4l2_event_pending(struct v4l2_fh *fh)
>> +{
>> +	struct v4l2_events *events =&fh->events;
>> +	unsigned long flags;
>> +	int ret;
>> +
>> +	spin_lock_irqsave(&events->lock, flags);
>> +	ret = !list_empty(&events->available);
>> +	spin_unlock_irqrestore(&events->lock, flags);
>> +
>> +	return ret;
>> +}
>> +EXPORT_SYMBOL_GPL(v4l2_event_pending);
>
> Hi Sakari,
>
> Disabling and restoring local interrupts to check if any events are
> pending seems excessive.
>
> Since you added an atomic_t with the number of events available in patch
> 5/7, why don't you just check that atomic_t here?

Thanks for the comments!

I'll put the fix to patch 5.

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

  reply	other threads:[~2009-12-23 10:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 16:42 [RFC v2 0/7] V4L2 file handles and event interface Sakari Ailus
2009-12-22 16:43 ` [RFC v2 1/7] V4L: File handles Sakari Ailus
2009-12-22 16:43   ` [RFC v2 2/7] V4L: Events: Add new ioctls for events Sakari Ailus
2009-12-22 16:43     ` [RFC v2 3/7] V4L: Events: Support event handling in do_ioctl Sakari Ailus
2009-12-22 16:43       ` [RFC v2 4/7] V4L: Events: Add backend Sakari Ailus
2009-12-22 16:43         ` [RFC v2 5/7] V4L: Events: Limit event queue length Sakari Ailus
2009-12-22 16:43           ` [RFC v2 6/7] V4L: Events: Sequence numbers Sakari Ailus
2009-12-22 16:43             ` [RFC v2 7/7] V4L: Events: Support all events Sakari Ailus
2010-01-18 12:48             ` [RFC v2 6/7] V4L: Events: Sequence numbers Hans Verkuil
2010-01-18 12:58           ` [RFC v2 5/7] V4L: Events: Limit event queue length Hans Verkuil
2010-01-19  8:11             ` Laurent Pinchart
2010-01-19  9:03               ` Hans Verkuil
2010-01-24 13:06             ` Sakari Ailus
2009-12-23  1:01         ` [RFC v2 4/7] V4L: Events: Add backend Andy Walls
2009-12-23 10:15           ` Sakari Ailus [this message]
2010-01-18 12:43         ` Hans Verkuil
2010-01-22 17:10           ` Sakari Ailus
2010-01-18 12:32   ` [RFC v2 1/7] V4L: File handles Hans Verkuil
2010-01-22 16:43     ` Sakari Ailus
2010-01-18 13:07 ` [RFC v2 0/7] V4L2 file handles and event interface Hans Verkuil
2010-01-19  8:23   ` Laurent Pinchart
2010-01-19  9:06     ` Hans Verkuil

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=4B31EDD1.9010701@maxwell.research.nokia.com \
    --to=sakari.ailus@maxwell.research.nokia.com \
    --cc=awalls@radix.net \
    --cc=gururaj.nagendra@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=iivanov@mm-sol.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.