Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libpthread



On Tue, Oct 16, 2007 at 07:00:11PM +0100, David Laight wrote:
> Is this a place where you can pick the 'id' in order to make it
> easy to lookup ?
> In which case careful selection of 'id' values can may the lookup
> a simple array index - as I did with process-id lookups in the kernel.

The problem is that the id can be invalid. We normally can assume that
it is just a pointer, but in a few cases, we have to actually check that
it is valid before using it. For those cases, the rb tree provides a
reasonable fast check without the problem of resizing a potentially
large array.

Joerg



Home | Main Index | Thread Index | Old Index