Subversion Repositories HelenOS

Rev

Rev 4227 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4227 Rev 4490
Line 192... Line 192...
192
    first_free_node = first_free_node->par;
192
    first_free_node = first_free_node->par;
193
   
193
   
194
    return node;
194
    return node;
195
}
195
}
196
 
196
 
197
static void test_tree_insert(avltree_t *tree, count_t node_count)
197
static void test_tree_insert(avltree_t *tree, size_t node_count)
198
{
198
{
199
    unsigned int i;
199
    unsigned int i;
200
    avltree_node_t *newnode;
200
    avltree_node_t *newnode;
201
   
201
   
202
    avltree_create(tree);
202
    avltree_create(tree);
203
   
203
   
204
    TPRINTF("Inserting %" PRIc " nodes...", node_count);
204
    TPRINTF("Inserting %" PRIs " nodes...", node_count);
205
   
205
   
206
    for (i = 0; i < node_count; i++) {
206
    for (i = 0; i < node_count; i++) {
207
        newnode = alloc_avltree_node();
207
        newnode = alloc_avltree_node();
208
       
208
       
209
        avltree_insert(tree, newnode);
209
        avltree_insert(tree, newnode);
Line 212... Line 212...
212
    }
212
    }
213
   
213
   
214
    TPRINTF("done.\n");
214
    TPRINTF("done.\n");
215
}
215
}
216
 
216
 
217
static void test_tree_delete(avltree_t *tree, count_t node_count,
217
static void test_tree_delete(avltree_t *tree, size_t node_count,
218
    int node_position)
218
    int node_position)
219
{
219
{
220
    avltree_node_t *delnode;
220
    avltree_node_t *delnode;
221
    unsigned int i;
221
    unsigned int i;
222
   
222
   
Line 243... Line 243...
243
    }
243
    }
244
   
244
   
245
    TPRINTF("done.\n");
245
    TPRINTF("done.\n");
246
}
246
}
247
 
247
 
248
static void test_tree_delmin(avltree_t *tree, count_t node_count)
248
static void test_tree_delmin(avltree_t *tree, size_t node_count)
249
{
249
{
250
    unsigned int i = 0;
250
    unsigned int i = 0;
251
   
251
   
252
    TPRINTF("Deleting minimum nodes...");
252
    TPRINTF("Deleting minimum nodes...");
253
   
253