lock ordering

This commit is contained in:
Jeremy Soller
2025-09-22 07:48:48 -06:00
parent e7358e3e5b
commit 5dc6f7c3ba
79 changed files with 2420 additions and 1181 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
use crate::{
context::Context,
context::{Context, ContextLock},
memory::{get_page_info, the_zeroed_frame, Frame, RefCount},
paging::{RmmA, RmmArch, TableKind, PAGE_SIZE},
sync::CleanLockToken,
};
use alloc::sync::Arc;
use hashbrown::{HashMap, HashSet};
use spinning_top::RwSpinlock;
/// Super unsafe due to page table switching and raw pointers!
pub unsafe fn debugger(target_id: Option<*const RwSpinlock<Context>>) {
pub unsafe fn debugger(target_id: Option<*const ContextLock>, token: &mut CleanLockToken) {
println!("DEBUGGER START");
println!();
@@ -21,7 +21,7 @@ pub unsafe fn debugger(target_id: Option<*const RwSpinlock<Context>>) {
let old_table = unsafe { RmmA::table(TableKind::User) };
for context_lock in crate::context::contexts().iter() {
for context_lock in crate::context::contexts(token.token()).iter() {
if target_id.map_or(false, |target_id| Arc::as_ptr(&context_lock.0) != target_id) {
continue;
}