Fix user CPU context saving
All checks were successful
Build documentation / build-and-deploy (push) Successful in 31s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 31s
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user