Nonblocking mail_receive, fix proc_kill scheduling issues
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m15s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m15s
This commit is contained in:
@@ -168,13 +168,13 @@ static void intr_exception (struct saved_regs* regs) {
|
||||
bool do_thiscpu = false;
|
||||
for (size_t i = 0; i < lengthof (rctx.cpus); i++) {
|
||||
if (rctx.cpus[i] != NULL && rctx.cpus[i] != thiscpu)
|
||||
cpu_request_sched (rctx.cpus[i]);
|
||||
cpu_request_sched (rctx.cpus[i], true);
|
||||
else
|
||||
do_thiscpu = true;
|
||||
}
|
||||
|
||||
if (do_thiscpu)
|
||||
cpu_request_sched (thiscpu);
|
||||
cpu_request_sched (thiscpu, true);
|
||||
} else {
|
||||
spin ();
|
||||
}
|
||||
@@ -228,13 +228,13 @@ void intr_handler (void* stack_ptr) {
|
||||
bool do_thiscpu = false;
|
||||
for (size_t i = 0; i < lengthof (rctx.cpus); i++) {
|
||||
if (rctx.cpus[i] != NULL && rctx.cpus[i] != thiscpu)
|
||||
cpu_request_sched (rctx.cpus[i]);
|
||||
cpu_request_sched (rctx.cpus[i], user);
|
||||
else
|
||||
do_thiscpu = true;
|
||||
}
|
||||
|
||||
if (do_thiscpu)
|
||||
cpu_request_sched (thiscpu);
|
||||
cpu_request_sched (thiscpu, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ struct cpu* cpu_get (void) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void cpu_request_sched (struct cpu* cpu) {
|
||||
void cpu_request_sched (struct cpu* cpu, bool user) {
|
||||
if (cpu == thiscpu) {
|
||||
proc_sched ();
|
||||
proc_sched (user);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,11 @@ struct cpu {
|
||||
};
|
||||
|
||||
struct cpu* cpu_make (uint64_t lapic_id, uint64_t acpi_id);
|
||||
|
||||
struct cpu* cpu_get (void);
|
||||
void cpu_request_sched (struct cpu* cpu);
|
||||
|
||||
void cpu_request_sched (struct cpu* cpu, bool user);
|
||||
|
||||
struct cpu* cpu_find_lightest (void);
|
||||
|
||||
#define thiscpu (cpu_get ())
|
||||
|
||||
@@ -69,13 +69,13 @@ uintptr_t syscall_dispatch (void* stack_ptr) {
|
||||
bool do_thiscpu = false;
|
||||
for (size_t i = 0; i < lengthof (rctx.cpus); i++) {
|
||||
if (rctx.cpus[i] != NULL && rctx.cpus[i] != thiscpu)
|
||||
cpu_request_sched (rctx.cpus[i]);
|
||||
cpu_request_sched (rctx.cpus[i], true);
|
||||
else
|
||||
do_thiscpu = true;
|
||||
}
|
||||
|
||||
if (do_thiscpu)
|
||||
cpu_request_sched (thiscpu);
|
||||
cpu_request_sched (thiscpu, true);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user