From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Daniel Walker <dwalker@mvista.com>,
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] Priority Lists for the RT mutex
Date: Fri, 06 May 2005 13:05:03 +0400 [thread overview]
Message-ID: <427B333F.5A0BB431@tv-sign.ru> (raw)
Daniel Walker wrote:
>
> Description:
> This patch adds the priority list data structure from Inaky Perez-Gonzalez
> to the Preempt Real-Time mutex.
>
> ...
>
> +#define plist_for_each(pos1, pos2, head) \
> + list_for_each_entry(pos1, &((head)->dp_node), dp_node) \
> + list_for_each_entry(pos2, &((pos1)->sp_node), sp_node)
I can't understand how this can work.
The fist list_for_each_entry(->dp_node) will iterate over nodes
with different priorities, ok. But the second one will skip the
first node (which starts new priority group), because list_for_each(head)
does not count head.
To be sure, I wrote simple test:
#include <stdio.h>
#include <limits.h>
#include "list.h"
#include "plist.h"
int main(void)
{
struct plist head, node, *pos1, *pos2;
plist_init(&head, 0);
plist_init(&node, 0);
plist_add(&node, &head);
plist_for_each(pos1, pos2, &head)
printf("Strange ???\n");
return 0;
}
Prints nothing.
My apologies if I'm misunderstanding something.
Oleg.
next reply other threads:[~2005-05-06 8:57 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 9:05 Oleg Nesterov [this message]
2005-05-06 11:13 ` Oleg Nesterov
2005-05-06 18:56 ` Daniel Walker
-- strict thread matches above, loose matches on Subject: below --
2005-05-06 18:13 Perez-Gonzalez, Inaky
2005-05-07 7:25 ` Oleg Nesterov
2005-05-09 7:30 ` Ingo Molnar
2005-05-09 8:08 ` Oleg Nesterov
2005-05-09 9:11 ` Ingo Molnar
2005-05-09 14:32 ` Oleg Nesterov
2005-05-09 18:13 ` Daniel Walker
2005-05-09 19:21 ` Steven Rostedt
2005-05-09 21:29 ` Daniel Walker
2005-05-09 22:15 ` Daniel Walker
2005-05-09 14:07 ` Daniel Walker
2005-04-12 0:36 Perez-Gonzalez, Inaky
2005-04-11 23:28 Perez-Gonzalez, Inaky
2005-04-12 0:27 ` Bill Huey
2005-04-11 22:31 Perez-Gonzalez, Inaky
2005-04-11 23:11 ` Bill Huey
2005-04-11 9:03 Perez-Gonzalez, Inaky
2005-04-11 8:49 Perez-Gonzalez, Inaky
2005-04-11 8:57 ` Ingo Molnar
2005-04-11 22:17 ` Bill Huey
2005-04-12 20:35 ` Esben Nielsen
2005-04-11 8:27 Perez-Gonzalez, Inaky
2005-04-11 8:42 ` Ingo Molnar
2005-04-08 23:05 Perez-Gonzalez, Inaky
2005-04-08 21:25 Perez-Gonzalez, Inaky
2005-04-08 22:53 ` Daniel Walker
2005-04-07 17:52 Daniel Walker
2005-04-08 6:28 ` Ingo Molnar
2005-04-08 8:05 ` Sven-Thorsten Dietrich
2005-04-10 11:09 ` Ingo Molnar
2005-04-12 17:56 ` Daniel Walker
2005-04-08 17:11 ` Daniel Walker
2005-04-10 10:53 ` Ingo Molnar
2005-04-11 16:19 ` Daniel Walker
2005-04-12 18:37 ` Paul E. McKenney
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=427B333F.5A0BB431@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=dwalker@mvista.com \
--cc=inaky.perez-gonzalez@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®