mirror of https://github.com/rusefi/ChibiOS.git
Added missing field to chconfs, adjusted OSAL wrapper.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13997 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f80db3de1e
commit
ad39bd7adb
|
@ -660,7 +660,8 @@
|
|||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
/* Add threads custom fields here.*/ \
|
||||
void *osal_delete_handler;
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
|
|
|
@ -642,7 +642,7 @@
|
|||
* @details User fields added to the end of the @p ch_system_t structure.
|
||||
*/
|
||||
#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \
|
||||
/* Add OS instance custom fields here.*/
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief OS instance initialization hook.
|
||||
|
@ -660,7 +660,8 @@
|
|||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
/* Add threads custom fields here.*/ \
|
||||
void *osal_delete_handler;
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
|
|
|
@ -2003,8 +2003,9 @@ int32 OS_TaskSetPriority(uint32 task_id, uint32 new_priority) {
|
|||
chSysLock();
|
||||
|
||||
/* Changing priority.*/
|
||||
if ((tp->prio == tp->realprio) || (rt_newprio > tp->prio)) {
|
||||
tp->prio = rt_newprio;
|
||||
if ((tp->hdr.pqueue.prio == tp->realprio) ||
|
||||
(rt_newprio > tp->hdr.pqueue.prio)) {
|
||||
tp->hdr.pqueue.prio = rt_newprio;
|
||||
}
|
||||
tp->realprio = rt_newprio;
|
||||
|
||||
|
@ -2021,8 +2022,8 @@ int32 OS_TaskSetPriority(uint32 task_id, uint32 new_priority) {
|
|||
case CH_STATE_SNDMSGQ:
|
||||
#endif
|
||||
/* Re-enqueues tp with its new priority on the queue.*/
|
||||
queue_prio_insert(queue_dequeue(tp),
|
||||
(threads_queue_t *)tp->u.wtobjp);
|
||||
ch_sch_prio_insert(ch_queue_dequeue(&tp->hdr.queue),
|
||||
(ch_queue_t *)tp->u.wtobjp);
|
||||
break;
|
||||
case CH_STATE_READY:
|
||||
#if CH_DBG_ENABLE_ASSERTS
|
||||
|
@ -2030,7 +2031,7 @@ int32 OS_TaskSetPriority(uint32 task_id, uint32 new_priority) {
|
|||
tp->state = CH_STATE_CURRENT;
|
||||
#endif
|
||||
/* Re-enqueues tp with its new priority on the ready list.*/
|
||||
chSchReadyI(queue_dequeue(tp));
|
||||
chSchReadyI((thread_t *)ch_queue_dequeue(&tp->hdr.queue));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue