Changeset 98000fb in mainline for kernel/generic/include/adt


Ignore:
Timestamp:
2009-06-03T19:34:45Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
301ff30
Parents:
69e68e3
Message:

remove redundant index_t and count_t types (which were always quite ambiguous and not actually needed)

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

Legend:

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

    r69e68e3 r98000fb  
    4242typedef struct {
    4343        uint8_t *map;
    44         count_t bits;
     44        size_t bits;
    4545} bitmap_t;
    4646
    47 extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits);
    48 extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits);
    49 extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits);
    50 extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits);
     47extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, size_t bits);
     48extern void bitmap_set_range(bitmap_t *bitmap, size_t start, size_t bits);
     49extern void bitmap_clear_range(bitmap_t *bitmap, size_t start, size_t bits);
     50extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, size_t bits);
    5151
    52 static inline int bitmap_get(bitmap_t *bitmap,index_t bit)
     52static inline int bitmap_get(bitmap_t *bitmap, size_t bit)
    5353{
    5454        if(bit >= bitmap->bits)
    5555                return 0;
     56       
    5657        return !! ((bitmap->map)[bit/8] & (1 << (bit & 7)));
    5758}
  • kernel/generic/include/adt/btree.h

    r69e68e3 r98000fb  
    4747typedef struct btree_node {
    4848        /** Number of keys. */
    49         count_t keys;
     49        size_t keys;
    5050
    5151        /**
  • kernel/generic/include/adt/fifo.h

    r69e68e3 r98000fb  
    6060        struct {                                        \
    6161                t fifo[(itms)];                         \
    62                 count_t items;                          \
    63                 index_t head;                           \
    64                 index_t tail;                           \
     62                size_t items;                           \
     63                size_t head;                            \
     64                size_t tail;                            \
    6565        } name = {                                      \
    6666                .items = (itms),                        \
     
    8181        struct {                                        \
    8282                t *fifo;                                \
    83                 count_t items;                          \
    84                 index_t head;                           \
    85                 index_t tail;                           \
     83                size_t items;                           \
     84                size_t head;                            \
     85                size_t tail;                            \
    8686        } name = {                                      \
    8787                .fifo = NULL,                           \
  • kernel/generic/include/adt/hash_table.h

    r69e68e3 r98000fb  
    4848         * @return Index into hash table.
    4949         */
    50         index_t (* hash)(unative_t key[]);
     50        size_t (* hash)(unative_t key[]);
    5151       
    5252        /** Hash table item comparison function.
     
    5757         * @return true if the keys match, false otherwise.
    5858         */
    59         bool (*compare)(unative_t key[], count_t keys, link_t *item);
     59        bool (*compare)(unative_t key[], size_t keys, link_t *item);
    6060
    6161        /** Hash table item removal callback.
     
    6969typedef struct {
    7070        link_t *entry;
    71         count_t entries;
    72         count_t max_keys;
     71        size_t entries;
     72        size_t max_keys;
    7373        hash_table_operations_t *op;
    7474} hash_table_t;
     
    7777        list_get_instance((item), type, member)
    7878
    79 extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys,
     79extern void hash_table_create(hash_table_t *h, size_t m, size_t max_keys,
    8080    hash_table_operations_t *op);
    8181extern void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item);
    8282extern link_t *hash_table_find(hash_table_t *h, unative_t key[]);
    83 extern void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys);
     83extern void hash_table_remove(hash_table_t *h, unative_t key[], size_t keys);
    8484
    8585#endif
Note: See TracChangeset for help on using the changeset viewer.