stos: pool: Protect pool structures with lock

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-24 17:43:45 +00:00
parent 995da1df2d
commit ed2d4744d7
2 changed files with 11 additions and 1 deletions
+3
View File
@@ -11,6 +11,7 @@
#include <hal/page.h>
#include <stapi/status.h>
#include <ke/spinlock.h>
#include <stdef.h>
/* Minimum log2 allocation size */
@@ -71,10 +72,12 @@ typedef struct {
*
* @BlockLevels: Block levels [granularity : GRAN(level)]
* @Id: Pool ID
* @Lock: Lock protecting this pool
*/
typedef struct {
MEMORY_BLOCK BlockLevels[LEVEL_COUNT];
USIZE Id;
SPINLOCK Lock;
} MEMORY_POOL;
/*