[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+1xoqeX-v14GrWzhk_g8_YLnuPXVwRckDbBq-CpJn+wqiicfg@mail.gmail.com>
Date: Mon, 14 Jan 2013 15:03:59 -0500
From: Sasha Levin <levinsasha928@...il.com>
To: Schrober <franzschrober@...oo.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Hashtable implementation breaks on flow statements
Hi Franz,
The hashtable should behave correctly (that is, not continue iteration
from the next
bucket) with regards to a 'break' inside the loop, this issue was
raised previously
during one of the RFCs and has been dealt with before the merge of the hashtable
into the kernel.
Do you see a case where it behaves incorrectly? can you share your code which
does that?
Thanks,
Sasha
On Mon, Jan 14, 2013 at 5:51 AM, Schrober <franzschrober@...oo.de> wrote:
> Hi,
>
> I think the new hash implementation in include/linux/hashtable.h is slightly
> unintuitive when using things like hash_for_each, hash_for_each_rcu,
> hash_for_each_safe and hash_for_each_possible.
>
> Users may want to get out of the loop through the hashtable iteration when
> some condition is met. This works well on hlist, list and other "abstract"
> data types. But the hash table would just jump to the next bucket and
> continue.
> --
> Franz Schrober
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists