> From: Sasha Khapyorsky [mailto:[EMAIL PROTECTED]
> 
> What about cleaner names? Maybe something like get_next_higher() or
just
> get_higher()?

The name comes from the fact for a key already in the list, it was
equivalent to:
        p = cl_qmap_get(map, key)
        p = cl_qmap_next(p)

However it also handles the case where the key was no longer in the list
or where the starting point is a key which may have never been in the
list.

This makes it very useful for situations like:
        lock list
        p = cl_qmap_head()
        process p
        k = p's key
        unlock list

        do some other stuff

        lock list
        p = cl_qmap_get_next(..., k)
        process p
        k = p's key
        unlock list

        ....

Another example use might be a map keyed by GUIDs and a query to find
all devices from a given vendor, in which case get_next could be used to
start the search.

We added this capability to our internal equivalent of complib a few
years ago and found a lot of uses for it.  So I thought it would be a
simple yet powerful capability to add to OFED complib.

Todd Rimmer
Chief Architect 
QLogic System Interconnect Group
Voice: 610-233-4852     Fax: 610-233-4777
[EMAIL PROTECTED]  www.QLogic.com
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to