Fix proc_setPri(), which now correctly changes the priority of processes in the ready...
[bertos.git] / bertos / kern / proc.c
index 9a1e410b11ffc60cb74df36ff4f07f95a6515a22..7ce077b0c14f7974a2e9a76c95770489fd66ac5b 100644 (file)
@@ -318,9 +318,9 @@ void proc_setPri(struct Process *proc, int pri)
 
                if (proc != CurrentProcess)
                {
-                               //proc_forbid();
-                               //TODO: re-enqueue process
-                               //pric_permit();
+                               proc_forbid();
+                               ATOMIC(SCHED_CHANGE_PRI(proc));
+                               proc_permit();
                }
 }
 #endif // CONFIG_KERN_PRI