[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

@@ -3,6 +3,7 @@
/// Allocator for physical memory frames
#include <stdint.h>
#include "kutil/spinlock.h"
namespace kernel {
namespace args {
@@ -43,7 +44,9 @@ public:
private:
frame_block *m_blocks;
long m_count;
size_t m_count;
kutil::spinlock m_lock;
frame_allocator() = delete;
frame_allocator(const frame_allocator &) = delete;