logo       

Re: ihash & qhash help: msg#00049

file-systems.sfs.general

Subject: Re: ihash & qhash help

ihash is used for data structures that are designed explicitly for
use with ihash. These data structure will contain a link (of type
ihash_entry<>) to another object of that type which ihash will use when
building the hash table. The i stands for internal, I believe.

qhash is use for data types that don't know they're being hashed, such
as str and int. I believe that it's implemented in terms of ihash by
wrapping these data types in a structure containing an ihash link.

Look in the SFS source tree at sfscd/sfscd.[Ch] for examples of both.

Michael

Yuchung Cheng [ycheng@xxxxxxxxxxx] wrote:
> I am using libasync to develop APs. Can somebody explain the
> difference between ihash and qhash? It seems qhash is a trimmed
> version of ihash? Thanks.
>
> Yuchung



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise