stos: pool: Protect pool structures with lock
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user