Subject: Re: libkern's rb tree
To: SODA Noriyuki <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 10/22/2007 18:18:32
On Oct 22, 2007, at 1:54 AM, SODA Noriyuki wrote:
>>>>>> On Fri, 19 Oct 2007 11:49:22 -0700,
> Jason Thorpe <email@example.com> said:
>> Oh, and another thing... the lookup and insert APIs in libkern's rb
>> code are nice ... and I find the ones in <sys/tree.h> completely
>> obnoxious to use.
> For me, <sys/tree.h> version is better for the insert API, because
> it does return whether the node already does exist or not, so it
> only requires one tree search instead of two times in the libkern
Ah, I see. It's trips an assert if the key already exists.
Well, that was completely trivial to fix.