Commit graph vbos/lib/rbtree.c
Author SHA1 Message Date
Michael Shaw
db5990cc97 mem: add locks to kernel memory management structures 2023-05-27 02:11:27 -04:00
Michael Shaw
29a0435cf6 slab: replace struct slab with slab_t
This type should never be modified by the user, and only passed into the
functions in slab.c. Using a typedef to notifies the user semantically
of this fact
2023-05-19 16:49:34 -04:00
Michael Shaw
0395b65ad8 stdio: add vsnprintf and change printf to kprintf 2023-05-14 01:23:21 -04:00
Michael Shaw
82c32011b4 rbtree: fix previously flawed implementation
got book'd up

Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-05-11 12:51:14 -04:00
Michael Shaw
408f00bb05 rbtree: add rbt_destroy
This function will free all the nodes inside the red-black tree. It is still
on the caller to free the struct rbtree that they passed into the function
if it was dynamically allocated
2023-05-10 23:23:24 -04:00
Michael Shaw
ea1c1b337d rbt: remove verify function 2023-05-10 21:57:40 -04:00
Michael Shaw
5121e78470 rbtree: cleanup functions 2023-05-10 21:55:17 -04:00
Michael Shaw
796ce36831 rbt: improve verification function 2023-05-10 21:53:27 -04:00
Michael Shaw
4e36cfd90b lib: add rbtree data structure
This also switches the kmalloc allocator over to the new rbtree
structure. As a balanced binary search tree, it is much more efficient
than the previous method
2023-05-10 21:24:19 -04:00