X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc_p.h;h=eea495f611cc5294d2b4deb3c730ad61a01c30c7;hb=747233b80705146400952ab08bea94f04bf23ae6;hp=54ea3710acb4f5ca4c72831451b82dc8e9cf01bd;hpb=ebaf963fb967c6511649cd8c348c56812214501f;p=bertos.git diff --git a/bertos/kern/proc_p.h b/bertos/kern/proc_p.h index 54ea3710..eea495f6 100644 --- a/bertos/kern/proc_p.h +++ b/bertos/kern/proc_p.h @@ -133,7 +133,7 @@ extern REGISTER List ProcReadyList; SCHED_ENQUEUE_INTERNAL(proc); \ } while (0) -#ifdef CONFIG_KERN_PRI +#if CONFIG_KERN_PRI /** * Changes the priority of an already enqueued process. * @@ -144,7 +144,7 @@ extern REGISTER List ProcReadyList; * * \note Performance could be improved with a different implementation of priority list. */ -INLINE void SCHED_CHANGE_PRI(struct Process *proc) +INLINE void sched_reenqueue(struct Process *proc) { IRQ_ASSERT_DISABLED(); LIST_ASSERT_VALID(&ProcReadyList); @@ -152,9 +152,9 @@ INLINE void SCHED_CHANGE_PRI(struct Process *proc) PriNode *pos = NULL; FOREACH_NODE(n, &ProcReadyList) { - if (n == &proc->link) + if (n == &proc->link.link) { - pos = n; + pos = (PriNode *)n; break; } }