Changeset 1b20da0 in mainline for kernel/generic/include/adt/cht.h
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/cht.h
rdf6ded8 r1b20da0 46 46 /** Concurrent hash table node link. */ 47 47 typedef struct cht_link { 48 /* Must be placed first. 49 * 50 * The function pointer (rcu_link.func) is used to store the item's 51 * mixed memoized hash. If in use by RCU (ie waiting for deferred 52 * destruction) the hash will contain the value of 48 /* Must be placed first. 49 * 50 * The function pointer (rcu_link.func) is used to store the item's 51 * mixed memoized hash. If in use by RCU (ie waiting for deferred 52 * destruction) the hash will contain the value of 53 53 * cht_t.op->remove_callback. 54 54 */ … … 64 64 typedef struct cht_ops { 65 65 /** Returns the hash of the item. 66 * 66 * 67 67 * Applicable also to items that were logically deleted from the table 68 68 * but have yet to be physically removed by means of remove_callback(). … … 80 80 81 81 /** Groups hash table buckets with their count. 82 * 82 * 83 83 * It allows both the number of buckets as well as the bucket array 84 84 * to be swapped atomically when resing the table. … … 100 100 /** Resized table buckets that will replace b once resize is complete. */ 101 101 cht_buckets_t *new_b; 102 /** Invalid memoized hash value. 103 * 102 /** Invalid memoized hash value. 103 * 104 104 * If cht_link.hash contains this value the item had been logically 105 105 * removed and is waiting to be freed. Such hashes (and the associated 106 * items) are disregarded and skipped or the actual hash must be 106 * items) are disregarded and skipped or the actual hash must be 107 107 * determined via op->hash(). 108 108 */ … … 116 116 work_t resize_work; 117 117 /** If positive the table should grow or shrink. 118 * 118 * 119 119 * If not 0 resize work had already been posted to the system work queue. 120 120 */ … … 133 133 134 134 extern bool cht_create_simple(cht_t *h, cht_ops_t *op); 135 extern bool cht_create(cht_t *h, size_t init_size, size_t min_size, 135 extern bool cht_create(cht_t *h, size_t init_size, size_t min_size, 136 136 size_t max_load, bool can_block, cht_ops_t *op); 137 137 extern void cht_destroy(cht_t *h);
Note:
See TracChangeset
for help on using the changeset viewer.