Currently there are separate linked list implementations scattered about the code base.
Implement a standardized linked list which can be reused in different situations. Also implement the following functions:
void ll_insert(struct link *); // Does insertion sort
status_t checked ll_remove(struct link *);
struct link *ll_closest(struct link *, int (*compare)(void *a, void *b));
struct link *ll_find(void *, int (*compare)(void *a, void *b));
bool ll_contains(struct link *, void*);
void ll_push(struct link *, void *);
struct link *ll_pop(struct link *);
Also, replace at least one of the following:
[ ] Linked list in devices (PR possibly pending)
[ ] Linked list in processes.
[ ] Linked list in vmem.c (alternately, replace this with an RB tree).
[ ] Linked list in kmem.c (requires rewriting tests).
Currently there are separate linked list implementations scattered about the code base. Implement a standardized linked list which can be reused in different situations. Also implement the following functions:
Also, replace at least one of the following: