active_list_init(head);
}
-void active_list_add_depend(struct active_list *node,
- struct active_list *depend)
-{
- list_del_init(&depend->node);
- list_add_tail(&depend->node, &node->depend);
- depend->depended = node;
-}
-
void active_list_add(struct active_list *head, struct active_list *node)
{
list_del_init(&node->node);
void active_list_head_delete(struct active_list *);
void active_list_init(struct active_list *ptr);
void active_list_clear(struct active_list *head);
-void active_list_add_depend(struct active_list *node,
- struct active_list *depend);
void active_list_add(struct active_list *head, struct active_list *node);
struct active_list *active_list_move_node(struct active_list *old_head,
struct active_list *new_head,
active_list_add(head, &node->list);
}
-static void active_test_add_depend(struct active_test *A, struct active_test *B)
-{
- active_list_add_depend(&A->list, &B->list);
-}
-
/*
.--A---B----C----D-----E----F
| |__k---L
active_test_add(head, M);
active_test_add(head, N);
active_test_add(head, O);
- active_test_add_depend(H, M);
- active_test_add_depend(A, G);
- active_test_add_depend(A, H);
- active_test_add_depend(A, I);
- active_test_add_depend(A, J);
- active_test_add_depend(J, O);
- active_test_add_depend(C, K);
- active_test_add_depend(C, L);
- active_test_add_depend(L, N);
}
static int active_test_compare(const void *a, const void *b)