Changeset 611 for trunk/kernel/libk/xhtab.h
- Timestamp:
- Jan 9, 2019, 3:02:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/xhtab.h
r610 r611 32 32 33 33 /////////////////////////////////////////////////////////////////////////////////////////// 34 // This file define a generic, embedded, remotely accessible hash table.34 // This file define a generic, embedded, remotely accessible, hash table. 35 35 // 36 36 // It can be accessed by any thread, running in any cluster. … … 39 39 // For this purpose the set of all registered items is split in several subsets. 40 40 // Each subset is organised as an embedded double linked xlists. 41 // - an item is uniquely identified by a <key>, that is a single uint32_t value. 42 // - From the <key> value, the hash table uses an item type specific xhtab_index() 41 // - an item is uniquely identified by a <key>, that is a item specific pointer, 42 // that can be a - for example - a char* defining the item "name". 43 // - From the <key> value, the hash table uses an item type specific index_from_key() 43 44 // function, to compute an <index> value, defining a subset of registered items. 44 45 // - to discriminate between items that have the same <index>, the hash table makes 45 // an associative search on the key in subset. 46 // an associative search on the key in subset, using the item type specific 47 // item_match_key() function. 46 48 // - Each registered item is a structure, that must contain an embedded xlist_entry, 47 49 // that is part of the xlist implementing the subset. 48 50 // 49 51 // For all registered items, a total order is defined by the increasing index values, 50 // and for each index value, by the position in the partial xlist.52 // and for each index value, by the position in the xlist implementing a subset. 51 53 // This order is used by the two functions xhtab_get_first() and xhtab_get_next(), that 52 54 // are used to scan all registered items. The two "current_index" and "current_xlist_xp"
Note: See TracChangeset
for help on using the changeset viewer.