Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578356

Re: [PATCH] sched: Enhance readability of iterating wake_list

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH] sched: Enhance readability of iterating wake_list
Date 2017-02-10 11:20 +0100
Message-ID <t9gt4-279-15@gated-at.bofh.it> (permalink)
References <t9aQF-6XG-3@gated-at.bofh.it> <t9ehA-xE-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 10, 2017 at 08:55:23AM +0100, Peter Zijlstra wrote:
> On Fri, Feb 10, 2017 at 01:09:31PM +0900, Byungchul Park wrote:
> > +#define for_each_wake_list(task, node) \
> > +	for ((task) = llist_entry((node), struct task_struct, wake_entry); \
> > +	     node; (node) = llist_next(node), \
> > +	     (task) = llist_entry((node), struct task_struct, wake_entry))
> > +
> 
> How about you make that llist_for_each(pos, member) or similar and
> replace all while (foo) { foo = llist_next(foo); } instances?
> 
> Because most llist_next() users have the same pattern.

Yes, it would be better. I will do it.

Thank you.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] sched: Enhance readability of iterating wake_list Byungchul Park <byungchul.park@lge.com> - 2017-02-10 05:20 +0100
  Re: [PATCH] sched: Enhance readability of iterating wake_list Peter Zijlstra <peterz@infradead.org> - 2017-02-10 09:00 +0100
    Re: [PATCH] sched: Enhance readability of iterating wake_list Byungchul Park <byungchul.park@lge.com> - 2017-02-10 11:20 +0100
    Re: [PATCH] sched: Enhance readability of iterating wake_list Byungchul Park <byungchul.park@lge.com> - 2017-02-10 12:00 +0100

csiph-web