Changeset 1b20da0 in mainline for kernel/generic/include/adt


Ignore:
Timestamp:
2018-02-28T17:52:03Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

Location:
kernel/generic/include/adt
Files:
7 edited

Legend:

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

    rdf6ded8 r1b20da0  
    6262struct avltree_node
    6363{
    64         /** 
     64        /**
    6565         * Pointer to the left descendant of this node.
    6666         *
     
    7070        struct avltree_node *lft;
    7171       
    72         /** 
     72        /**
    7373         * Pointer to the right descendant of this node.
    7474         *
     
    8282       
    8383        /** Node's key. */
    84         avltree_key_t key; 
     84        avltree_key_t key;
    8585       
    8686        /**
     
    9797        struct avltree_node *root;
    9898
    99         /** 
     99        /**
    100100         * Base of the tree is a value that is smaller or equal than every value
    101101         * in the tree (valid for positive keys otherwise ignore this atribute).
    102          * 
     102         *
    103103         * The base is added to the current key when a new node is inserted into
    104104         * the tree. The base is changed to the key of the node which is deleted
    105105         * with avltree_delete_min().
    106106         */
    107         avltree_key_t base; 
     107        avltree_key_t base;
    108108};
    109109
  • kernel/generic/include/adt/btree.h

    rdf6ded8 r1b20da0  
    5555        btree_key_t key[BTREE_MAX_KEYS + 1];
    5656
    57         /** 
     57        /**
    5858         * Pointers to values. Sorted according to the key array. Defined only in
    5959         * leaf-level. There is room for storing value for the extra key.
  • kernel/generic/include/adt/cht.h

    rdf6ded8 r1b20da0  
    4646/** Concurrent hash table node link. */
    4747typedef 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
    5353         * cht_t.op->remove_callback.
    5454         */
     
    6464typedef struct cht_ops {
    6565        /** Returns the hash of the item.
    66          * 
     66         *
    6767         * Applicable also to items that were logically deleted from the table
    6868         * but have yet to be physically removed by means of remove_callback().
     
    8080
    8181/** Groups hash table buckets with their count.
    82  * 
     82 *
    8383 * It allows both the number of buckets as well as the bucket array
    8484 * to be swapped atomically when resing the table.
     
    100100        /** Resized table buckets that will replace b once resize is complete. */
    101101        cht_buckets_t *new_b;
    102         /** Invalid memoized hash value. 
    103          * 
     102        /** Invalid memoized hash value.
     103         *
    104104         * If cht_link.hash contains this value the item had been logically
    105105         * 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
    107107         * determined via op->hash().
    108108         */
     
    116116        work_t resize_work;
    117117        /** If positive the table should grow or shrink.
    118          * 
     118         *
    119119         * If not 0 resize work had already been posted to the system work queue.
    120120         */
     
    133133
    134134extern 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, 
     135extern bool cht_create(cht_t *h, size_t init_size, size_t min_size,
    136136        size_t max_load, bool can_block, cht_ops_t *op);
    137137extern void cht_destroy(cht_t *h);
  • kernel/generic/include/adt/fifo.h

    rdf6ded8 r1b20da0  
    7272 *
    7373 * FIFO is allocated dynamically.
    74  * This macro is suitable for creating larger FIFOs. 
     74 * This macro is suitable for creating larger FIFOs.
    7575 *
    7676 * @param name Name of FIFO.
  • kernel/generic/include/adt/hash.h

    rdf6ded8 r1b20da0  
    7575
    7676/** Produces a uniform hash affecting all output bits from the skewed input. */
    77 static inline size_t hash_mix(size_t hash) 
     77static inline size_t hash_mix(size_t hash)
    7878{
    7979#ifdef __32_BITS__
     
    8787
    8888/** Use to create a hash from multiple values.
    89  * 
     89 *
    9090 * Typical usage:
    9191 * @code
     
    101101static inline size_t hash_combine(size_t seed, size_t hash)
    102102{
    103         /* 
     103        /*
    104104         * todo: use Bob Jenkin's proper mixing hash pass:
    105105         * http://burtleburtle.net/bob/c/lookup3.c
  • kernel/generic/include/adt/hash_table.h

    rdf6ded8 r1b20da0  
    22 * Copyright (c) 2006 Jakub Jermar
    33 * Copyright (c) 2012 Adam Hraska
    4  * 
     4 *
    55 * All rights reserved.
    66 *
     
    6262
    6363        /** Hash table item removal callback.
    64          * 
     64         *
    6565         * Must not invoke any mutating functions of the hash table.
    6666         *
  • kernel/generic/include/adt/list.h

    rdf6ded8 r1b20da0  
    6666
    6767/** Initializer for statically allocated list.
    68  * 
     68 *
    6969 * @code
    7070 * struct named_list {
    7171 *     const char *name;
    7272 *     list_t list;
    73  * } var = { 
    74  *     .name = "default name", 
    75  *     .list = LIST_INITIALIZER(name_list.list) 
     73 * } var = {
     74 *     .name = "default name",
     75 *     .list = LIST_INITIALIZER(name_list.list)
    7676 * };
    7777 * @endcode
     
    111111 *     link_t item_link;
    112112 * } item_t;
    113  * 
     113 *
    114114 * //..
    115  * 
     115 *
    116116 * // Print each list element's value and remove the element from the list.
    117117 * list_foreach_safe(mylist, cur_link, next_link) {
     
    121121 * }
    122122 * @endcode
    123  * 
     123 *
    124124 * @param list List to traverse.
    125125 * @param iterator Iterator to the current element of the list.
Note: See TracChangeset for help on using the changeset viewer.