Fix user CPU context saving
All checks were successful
Build documentation / build-and-deploy (push) Successful in 31s

This commit is contained in:
2026-01-25 17:39:34 +01:00
parent 95f590fb3b
commit 8650010992
9 changed files with 27 additions and 29 deletions

View File

@@ -18,7 +18,7 @@ bool proc_create_resource_mutex (struct proc_mutex* mutex) {
void proc_cleanup_resource_mutex (struct proc* proc, struct proc_resource* resource) {
struct proc_mutex* mutex = &resource->u.mutex;
proc_mutex_unlock (proc, mutex);
/* proc_mutex_unlock (proc, mutex); */
}
static void proc_mutex_suspend (struct proc* proc, struct proc_suspension_q* sq,

View File

@@ -294,7 +294,7 @@ static void proc_reap (void) {
}
void proc_sched (void) {
spin_lock_ctx_t ctxcpu, ctxpr;
spin_lock_ctx_t ctxcpu;
int s_cycles = atomic_fetch_add (&sched_cycles, 1);
@@ -306,15 +306,8 @@ void proc_sched (void) {
spin_lock (&cpu->lock, &ctxcpu);
struct proc* prev = cpu->proc_current;
next = proc_find_sched (cpu);
if (prev != NULL) {
spin_lock (&prev->lock, &ctxpr);
memcpy (&prev->pdata.regs, &cpu->regs, sizeof (struct saved_regs));
spin_unlock (&prev->lock, &ctxpr);
}
if (next) {
cpu->proc_current = next;