36 #ifndef __TOMMYCHAIN_H 37 #define __TOMMYCHAIN_H 63 first_after->
prev = second_tail;
64 second_head->
prev = first_before;
67 first_before->
next = second_head;
68 second_tail->
next = first_after;
77 second_head->
prev = first_tail;
80 first_tail->
next = second_head;
93 if (cmp(first_i->
data, second_i->
data) > 0) {
95 if (first_i == first->
head) {
97 first->
head = second_i;
101 if (second_i == second->
tail)
105 if (first_i == first->
tail) {
110 first_i = first_i->
next;
142 #define TOMMY_CHAIN_BIT_MAX 32 190 while ((mask & 1) != 0) {
struct tommy_chain_struct tommy_chain
tommy_uint32_t tommy_count_t
#define TOMMY_CHAIN_BIT_MAX
struct tommy_node_struct * next
tommy_inline void tommy_chain_splice(tommy_node *first_before, tommy_node *first_after, tommy_node *second_head, tommy_node *second_tail)
struct tommy_node_struct * prev
tommy_inline tommy_uint_t tommy_ctz_u32(tommy_uint32_t value)
int tommy_compare_func(const void *obj_a, const void *obj_b)
tommy_inline void tommy_chain_merge_degenerated(tommy_chain *first, tommy_chain *second, tommy_compare_func *cmp)
tommy_inline void tommy_chain_concat(tommy_node *first_tail, tommy_node *second_head)
tommy_inline void tommy_chain_merge(tommy_chain *first, tommy_chain *second, tommy_compare_func *cmp)
tommy_inline void tommy_chain_mergesort(tommy_chain *chain, tommy_compare_func *cmp)