cpu: change _cpu()->thread calls to current_thread() to fix smp race

This commit is contained in:
Matheus
2024-09-15 17:47:26 -03:00
parent d1c0f2a5fd
commit e058d62261
65 changed files with 196 additions and 190 deletions
+2 -2
View File
@@ -378,12 +378,12 @@ void jobctl_procremove(proc_t *proc) {
}
// proc can be null if the signal is being sent to the calling processes own process group
// since that is only passed from a userland thread, we can assume _cpu()->thread->proc is not null
// since that is only passed from a userland thread, we can assume current_thread()->proc is not null
int jobctl_signal(proc_t *proc, int signal, proc_t *sender) {
int error = 0;
bool intstatus = interrupt_set(false);
proc_t *leader;
proc_t *tmpproc = _cpu()->thread->proc;
proc_t *tmpproc = current_thread()->proc;
pid_t senderpgid = sender ? jobctl_getpgid(sender) : 0;
if (proc == NULL) {