Disable threaded syscalls until threaded allocation issues are solved

This commit is contained in:
Jeremy Soller
2021-10-20 20:05:47 -06:00
parent 64f1533d6f
commit 9ea278997c
2 changed files with 12 additions and 1 deletions

View File

@@ -42,13 +42,15 @@ raw-cpuid = "8.0.0"
x86 = { version = "0.32.0", default-features = false }
[features]
default = ["acpi", "multi_core", "serial_debug"]
default = ["acpi", "multi_core", "no_threaded_syscalls", "serial_debug"]
acpi = []
doc = []
graphical_debug = []
live = []
lpss_debug = []
multi_core = ["acpi"]
#TODO: remove when threading issues are fixed
no_threaded_syscalls = []
pti = []
qemu_debug = []
serial_debug = []

View File

@@ -253,8 +253,17 @@ pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, bp: u
}
}
#[cfg(feature = "no_threaded_syscalls")]
let syscall_lock = {
static SYSCALL_LOCK: spin::Mutex<()> = spin::Mutex::new(());
SYSCALL_LOCK.lock();
};
let result = inner(a, b, c, d, e, f, bp, stack);
#[cfg(feature = "no_threaded_syscalls")]
drop(syscall_lock);
{
let contexts = crate::context::contexts();
if let Some(context_lock) = contexts.current() {