Started code to manage kernel resource table

This commit is contained in:
2021-04-17 00:57:37 -05:00
parent 9630d0a396
commit cb6d2681ef
2 changed files with 40 additions and 0 deletions

13
src/resource.c Normal file
View File

@@ -0,0 +1,13 @@
#include "resource.h"
int find_resource_slot(struct resource_table_t *table)
{
for(int i = 0; i < table->capacity; i++)
{
if(table->array[i].type == RESOURCE_UNAVAILABLE)
{
return i;
}
}
return -1;
}