From 577cbd52ed92c699468bff44231d5c6ae9538a00 Mon Sep 17 00:00:00 2001 From: xerox Date: Wed, 4 Nov 2020 21:39:50 -0800 Subject: [PATCH] when destroying mem_ctx, dont use vdm_ctx to do so, also yeild execution to cause a context switch... --- nasa-tables/mem_ctx/mem_ctx.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nasa-tables/mem_ctx/mem_ctx.cpp b/nasa-tables/mem_ctx/mem_ctx.cpp index 217e94a..12ebd48 100644 --- a/nasa-tables/mem_ctx/mem_ctx.cpp +++ b/nasa-tables/mem_ctx/mem_ctx.cpp @@ -76,9 +76,8 @@ namespace nasa mem_ctx::~mem_ctx() { - // remove pml4e - pml4e null_value{ NULL }; - set_pml4e(reinterpret_cast<::ppml4e>(get_dirbase()) + this->pml4e_index, null_value, true); + set_pml4e(reinterpret_cast<::ppml4e>(get_dirbase()) + this->pml4e_index, pml4e{NULL}); + while (!SwitchToThread()); } void* mem_ctx::set_page(void* addr)