[kernel] Add spinlocks to vm_space, frame_allocator

Also updated spinlock interface to be an object, and added a scoped lock
object that uses it as well.
This commit is contained in:
Justin C. Miller
2021-02-10 23:57:51 -08:00
parent 793bba95b5
commit 8c0d52d0fe
7 changed files with 68 additions and 29 deletions

View File

@@ -4,6 +4,7 @@
#include <stdint.h>
#include "kutil/enum_bitfields.h"
#include "kutil/spinlock.h"
#include "kutil/vector.h"
#include "page_table.h"
@@ -127,6 +128,8 @@ private:
bool operator==(const struct area &o) const;
};
kutil::vector<area> m_areas;
kutil::spinlock m_lock;
};
IS_BITFIELD(vm_space::fault_type);