diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 17:52:17 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 18:17:06 +0200 |
| commit | 5fd0d48f6371f04e910730493ce908807af5c46a (patch) | |
| tree | 73bb7e2cef63e477dd3d00499e7d553948d9064b /common/mem_nodes.c | |
| parent | 12dc34aed789ae8e7ba342c0ab6b33529516b4bd (diff) | |
| download | kmi-5fd0d48f6371f04e910730493ce908807af5c46a.tar.gz kmi-5fd0d48f6371f04e910730493ce908807af5c46a.zip | |
Renamed region functions to not use sp_*
Diffstat (limited to 'common/mem_nodes.c')
| -rw-r--r-- | common/mem_nodes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/mem_nodes.c b/common/mem_nodes.c index dba714f..c3e3ff9 100644 --- a/common/mem_nodes.c +++ b/common/mem_nodes.c @@ -10,7 +10,7 @@ enum block_status { struct block_wrapper { enum block_status status; - struct sp_mem n; + struct mem_region n; }; struct block_region { @@ -64,7 +64,7 @@ void destroy_mem_blocks() __destroy_mem_block(sp_root(root_region)); } -static struct sp_mem *__find_free_block(struct block_region *h) +static struct mem_region *__find_free_block(struct block_region *h) { struct block_wrapper *w = region_to_array(h); for(size_t i = 0; i < MAX_BLOCKS; ++i){ @@ -124,7 +124,7 @@ static void __update_regions(struct block_region *r) __region_insert(r); } -struct sp_mem *get_mem_node() +struct mem_region *get_mem_node() { struct sp_node *n = sp_root(root_region); @@ -149,7 +149,7 @@ struct sp_mem *get_mem_node() return __find_free_block(r); } -void free_mem_node(struct sp_mem *m) +void free_mem_node(struct mem_region *m) { struct block_wrapper *w = block_container(m); w->status = FREE; |
