]> git.corax.cc Git - corax/commitdiff
Add missing implementation of process_suspend()
authorMatthias Kruk <m@m10k.eu>
Mon, 25 Nov 2019 06:09:31 +0000 (15:09 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 25 Nov 2019 06:09:31 +0000 (15:09 +0900)
kernel/core/process.c

index 2c4a5454d633680fc6d3b0ce5983c48448de7520..7d45a27f96fc2f2d91e3904b088c926ec0492059 100644 (file)
@@ -906,10 +906,16 @@ static void _sig_cont(int sig)
 int process_suspend(process_t *proc)
 {
        int ret_val;
-
-       ret_val = -ENOSYS;
+       int i;
 
        /* FIXME: Send IPIs to all processors executing tasks from proc */
+       process_lock(proc);
+
+       for(i = 0; i < CONFIG_PROC_MAXTASKS; i++) {
+               ret_val = sched_task_suspend(proc->p_tasks[i]);
+       }
+
+       process_unlock(proc);
 
        return(ret_val);
 }