Changeset 6eaed07 in mainline for kernel/generic/include/adt/cht.h


Ignore:
Timestamp:
2012-08-04T21:14:24Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1c7755
Parents:
26d8df3
Message:

cht: Switched to using a sentinel node instead of checking for NULLs. Added hash memoization (stored in cht_link_t.rcu_link.func function pointer).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/cht.h

    r26d8df3 r6eaed07  
    4646/** Concurrent hash table node link. */
    4747typedef struct cht_link {
    48         /* Must be placed first. */
    49         rcu_item_t rcu_link;
     48        /* Must be placed first.
     49         *
     50         * The function pointer (rcu_link.func) is used to store the item's
     51         * memoized hash.
     52         */
     53        union {
     54                rcu_item_t rcu_link;
     55                size_t hash;
     56        };
    5057        /** Link to the next item in the bucket including any marks. */
    5158        cht_ptr_t link;
     
    7178        cht_ops_t *op;
    7279       
    73         size_t min_order;
    7480        cht_buckets_t *b;
    7581        cht_buckets_t *new_b;
     82        size_t invalid_hash;
    7683
     84        size_t min_order;
    7785        size_t max_load;
    7886        work_t resize_work;
Note: See TracChangeset for help on using the changeset viewer.