diff --git a/sched/group/group_continue.c b/sched/group/group_continue.c index 70f9c508b8..63aa35ac1c 100644 --- a/sched/group/group_continue.c +++ b/sched/group/group_continue.c @@ -77,7 +77,7 @@ static int group_continue_handler(pid_t pid, FAR void *arg) if (nxsched_add_readytorun(rtcb)) { - up_switch_context(rtcb, tcb); + up_switch_context(this_task(), tcb); } } diff --git a/sched/mqueue/mq_rcvinternal.c b/sched/mqueue/mq_rcvinternal.c index 8ddac55429..4cbb638880 100644 --- a/sched/mqueue/mq_rcvinternal.c +++ b/sched/mqueue/mq_rcvinternal.c @@ -267,7 +267,7 @@ void nxmq_notify_receive(FAR struct mqueue_inode_s *msgq) if (nxsched_add_readytorun(btcb)) { - up_switch_context(btcb, rtcb); + up_switch_context(this_task(), rtcb); } } } diff --git a/sched/mqueue/mq_sndinternal.c b/sched/mqueue/mq_sndinternal.c index 0f36d4b04a..661ada915b 100644 --- a/sched/mqueue/mq_sndinternal.c +++ b/sched/mqueue/mq_sndinternal.c @@ -300,7 +300,7 @@ void nxmq_notify_send(FAR struct mqueue_inode_s *msgq) if (nxsched_add_readytorun(btcb)) { - up_switch_context(btcb, rtcb); + up_switch_context(this_task(), rtcb); } } } diff --git a/sched/mqueue/mq_waitirq.c b/sched/mqueue/mq_waitirq.c index db59c72164..d964907812 100644 --- a/sched/mqueue/mq_waitirq.c +++ b/sched/mqueue/mq_waitirq.c @@ -107,6 +107,6 @@ void nxmq_wait_irq(FAR struct tcb_s *wtcb, int errcode) if (nxsched_add_readytorun(wtcb)) { - up_switch_context(wtcb, rtcb); + up_switch_context(this_task(), rtcb); } } diff --git a/sched/mqueue/msgrcv.c b/sched/mqueue/msgrcv.c index 6823169510..a67cfd13d9 100644 --- a/sched/mqueue/msgrcv.c +++ b/sched/mqueue/msgrcv.c @@ -266,7 +266,7 @@ ssize_t msgrcv(int msqid, FAR void *msgp, size_t msgsz, long msgtyp, if (nxsched_add_readytorun(btcb)) { - up_switch_context(btcb, rtcb); + up_switch_context(this_task(), rtcb); } } diff --git a/sched/mqueue/msgsnd.c b/sched/mqueue/msgsnd.c index 4384af24b1..6ddd94b977 100644 --- a/sched/mqueue/msgsnd.c +++ b/sched/mqueue/msgsnd.c @@ -259,7 +259,7 @@ int msgsnd(int msqid, FAR const void *msgp, size_t msgsz, int msgflg) if (nxsched_add_readytorun(btcb)) { - up_switch_context(btcb, rtcb); + up_switch_context(this_task(), rtcb); } } } diff --git a/sched/paging/pg_worker.c b/sched/paging/pg_worker.c index bd55404666..c7816369a3 100644 --- a/sched/paging/pg_worker.c +++ b/sched/paging/pg_worker.c @@ -297,7 +297,7 @@ static inline bool pg_dequeue(void) if (nxsched_add_readytorun(g_pftcb)) { - up_switch_context(g_pftcb, wtcb); + up_switch_context(this_task(), wtcb); } } } @@ -494,7 +494,7 @@ static inline void pg_fillcomplete(void) if (nxsched_add_readytorun(g_pftcb)) { - up_switch_context(g_pftcb, wtcb); + up_switch_context(this_task(), wtcb); } } @@ -597,7 +597,7 @@ int pg_worker(int argc, FAR char *argv[]) if (nxsched_add_readytorun(g_pftcb)) { - up_switch_context(g_pftcb, wtcb); + up_switch_context(this_task(), wtcb); } /* Yes .. Start the next asynchronous fill. Check the return @@ -682,7 +682,7 @@ int pg_worker(int argc, FAR char *argv[]) if (nxsched_add_readytorun(g_pftcb)) { - up_switch_context(g_pftcb, wtcb); + up_switch_context(this_task(), wtcb); } } diff --git a/sched/semaphore/sem_post.c b/sched/semaphore/sem_post.c index ae04819492..cbf5758f67 100644 --- a/sched/semaphore/sem_post.c +++ b/sched/semaphore/sem_post.c @@ -221,7 +221,7 @@ int nxsem_post_slow(FAR sem_t *sem) if (nxsched_add_readytorun(stcb)) { - up_switch_context(stcb, rtcb); + up_switch_context(this_task(), rtcb); } } } diff --git a/sched/semaphore/sem_waitirq.c b/sched/semaphore/sem_waitirq.c index 3fc1329797..1b38b3faaa 100644 --- a/sched/semaphore/sem_waitirq.c +++ b/sched/semaphore/sem_waitirq.c @@ -125,6 +125,6 @@ void nxsem_wait_irq(FAR struct tcb_s *wtcb, int errcode) if (nxsched_add_readytorun(wtcb)) { - up_switch_context(wtcb, rtcb); + up_switch_context(this_task(), rtcb); } } diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 12a6bb6214..82867e31ee 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -556,7 +556,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info, if (nxsched_add_readytorun(stcb)) { - up_switch_context(stcb, rtcb); + up_switch_context(this_task(), rtcb); } #ifdef CONFIG_LIB_SYSCALL @@ -614,7 +614,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info, if (nxsched_add_readytorun(stcb)) { - up_switch_context(stcb, rtcb); + up_switch_context(this_task(), rtcb); } } @@ -674,7 +674,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info, if (nxsched_add_readytorun(stcb)) { - up_switch_context(stcb, rtcb); + up_switch_context(this_task(), rtcb); } #endif } diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c index 4a0ce54ab7..fb94a9295f 100644 --- a/sched/signal/sig_timedwait.c +++ b/sched/signal/sig_timedwait.c @@ -117,7 +117,7 @@ static void nxsig_timeout(wdparm_t arg) if (nxsched_add_readytorun(wtcb)) { - up_switch_context(wtcb, rtcb); + up_switch_context(this_task(), rtcb); } } @@ -185,7 +185,7 @@ void nxsig_wait_irq(FAR struct tcb_s *wtcb, int errcode) if (nxsched_add_readytorun(wtcb)) { - up_switch_context(wtcb, rtcb); + up_switch_context(this_task(), rtcb); } } diff --git a/sched/task/task_activate.c b/sched/task/task_activate.c index 5c71f9131b..727d1acad1 100644 --- a/sched/task/task_activate.c +++ b/sched/task/task_activate.c @@ -95,7 +95,7 @@ void nxtask_activate(FAR struct tcb_s *tcb) if (nxsched_add_readytorun(tcb)) { - up_switch_context(tcb, rtcb); + up_switch_context(this_task(), rtcb); } leave_critical_section(flags);