Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1702 → Rev 1780

/kernel/trunk/generic/include/adt/hash_table.h
55,7 → 55,7
*
* @return Index into hash table.
*/
index_t (* hash)(__native key[]);
index_t (* hash)(unative_t key[]);
/** Hash table item comparison function.
*
63,7 → 63,7
*
* @return true if the keys match, false otherwise.
*/
bool (*compare)(__native key[], count_t keys, link_t *item);
bool (*compare)(unative_t key[], count_t keys, link_t *item);
 
/** Hash table item removal callback.
*
75,9 → 75,9
#define hash_table_get_instance(item, type, member) list_get_instance((item), type, member)
 
extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op);
extern void hash_table_insert(hash_table_t *h, __native key[], link_t *item);
extern link_t *hash_table_find(hash_table_t *h, __native key[]);
extern void hash_table_remove(hash_table_t *h, __native key[], count_t keys);
extern void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item);
extern link_t *hash_table_find(hash_table_t *h, unative_t key[]);
extern void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys);
 
#endif
 
/kernel/trunk/generic/include/adt/list.h
175,7 → 175,7
headless_list_split_or_concat(part1, part2);
}
 
#define list_get_instance(link,type,member) (type *)(((__u8*)(link))-((__u8*)&(((type *)NULL)->member)))
#define list_get_instance(link,type,member) (type *)(((uint8_t*)(link))-((uint8_t*)&(((type *)NULL)->member)))
 
extern bool list_member(const link_t *link, const link_t *head);
extern void list_concat(link_t *head1, link_t *head2);
/kernel/trunk/generic/include/adt/bitmap.h
41,11 → 41,11
#define BITS2BYTES(bits) (bits ? ((((bits)-1)>>3)+1) : 0)
 
typedef struct {
__u8 *map;
uint8_t *map;
count_t bits;
} bitmap_t;
 
extern void bitmap_initialize(bitmap_t *bitmap, __u8 *map, count_t bits);
extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits);
extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits);
extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits);
extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits);
/kernel/trunk/generic/include/adt/btree.h
42,7 → 42,7
#define BTREE_M 5
#define BTREE_MAX_KEYS (BTREE_M - 1)
 
typedef __u64 btree_key_t;
typedef uint64_t btree_key_t;
 
/** B-tree node structure. */
struct btree_node {