diff --git a/arch/arm/src/arm/arm_blocktask.c b/arch/arm/src/arm/arm_blocktask.c index ff99acee607..85e0c46059d 100644 --- a/arch/arm/src/arm/arm_blocktask.c +++ b/arch/arm/src/arm/arm_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -163,7 +163,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/arm/arm_releasepending.c b/arch/arm/src/arm/arm_releasepending.c index 7bf29e568c2..2ff74c72807 100644 --- a/arch/arm/src/arm/arm_releasepending.c +++ b/arch/arm/src/arm/arm_releasepending.c @@ -64,7 +64,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -84,7 +84,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -118,7 +118,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/arm/arm_reprioritizertr.c b/arch/arm/src/arm/arm_reprioritizertr.c index bdcb5fbb13b..3b3d8538682 100644 --- a/arch/arm/src/arm/arm_reprioritizertr.c +++ b/arch/arm/src/arm/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -173,7 +173,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/arm/arm_unblocktask.c b/arch/arm/src/arm/arm_unblocktask.c index 86560bfa0a8..c0dd378ecc0 100644 --- a/arch/arm/src/arm/arm_unblocktask.c +++ b/arch/arm/src/arm/arm_unblocktask.c @@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -99,7 +99,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -134,7 +134,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv6-m/arm_assert.c b/arch/arm/src/armv6-m/arm_assert.c index 75a58ee4b14..4ba020cbe02 100644 --- a/arch/arm/src/armv6-m/arm_assert.c +++ b/arch/arm/src/armv6-m/arm_assert.c @@ -150,7 +150,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/arm/src/armv6-m/arm_blocktask.c b/arch/arm/src/armv6-m/arm_blocktask.c index b92c23420fc..5af2d45f94d 100644 --- a/arch/arm/src/armv6-m/arm_blocktask.c +++ b/arch/arm/src/armv6-m/arm_blocktask.c @@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv6-m/arm_releasepending.c b/arch/arm/src/armv6-m/arm_releasepending.c index 6b41fdd26ea..cf5b6c811e9 100644 --- a/arch/arm/src/armv6-m/arm_releasepending.c +++ b/arch/arm/src/armv6-m/arm_releasepending.c @@ -63,7 +63,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -83,7 +83,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -98,7 +98,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv6-m/arm_reprioritizertr.c b/arch/arm/src/armv6-m/arm_reprioritizertr.c index 89374cddf97..71ff1d67bb5 100644 --- a/arch/arm/src/armv6-m/arm_reprioritizertr.c +++ b/arch/arm/src/armv6-m/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv6-m/arm_svcall.c b/arch/arm/src/armv6-m/arm_svcall.c index 98af9556fa3..15c16f2d823 100644 --- a/arch/arm/src/armv6-m/arm_svcall.c +++ b/arch/arm/src/armv6-m/arm_svcall.c @@ -236,7 +236,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_LIB_SYSCALL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -350,7 +350,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -388,7 +388,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -409,7 +409,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/arm/src/armv6-m/arm_unblocktask.c b/arch/arm/src/armv6-m/arm_unblocktask.c index bc8a8de2152..d6558d8dccc 100644 --- a/arch/arm/src/armv6-m/arm_unblocktask.c +++ b/arch/arm/src/armv6-m/arm_unblocktask.c @@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -97,7 +97,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -112,7 +112,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv7-a/arm_addrenv_shm.c b/arch/arm/src/armv7-a/arm_addrenv_shm.c index 7e6387c1677..2792cc94ce9 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_shm.c +++ b/arch/arm/src/armv7-a/arm_addrenv_shm.c @@ -79,7 +79,7 @@ int up_shmat(FAR uintptr_t *pages, unsigned int npages, uintptr_t vaddr) { - FAR struct tcb_s *tcb = sched_self(); + FAR struct tcb_s *tcb = nxsched_self(); FAR struct task_group_s *group; FAR uintptr_t *l1entry; FAR uint32_t *l2table; @@ -228,7 +228,7 @@ int up_shmat(FAR uintptr_t *pages, unsigned int npages, uintptr_t vaddr) int up_shmdt(uintptr_t vaddr, unsigned int npages) { - FAR struct tcb_s *tcb = sched_self(); + FAR struct tcb_s *tcb = nxsched_self(); FAR struct task_group_s *group; FAR uintptr_t *l1entry; FAR uint32_t *l2table; diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index f66f02867b2..4d55d4e8708 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -138,7 +138,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/arm/src/armv7-a/arm_blocktask.c b/arch/arm/src/armv7-a/arm_blocktask.c index 8145c23a54f..e82fe616100 100644 --- a/arch/arm/src/armv7-a/arm_blocktask.c +++ b/arch/arm/src/armv7-a/arm_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -163,7 +163,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index 40c6d61c2be..47254183f03 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -130,7 +130,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -170,7 +170,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/arm/src/armv7-a/arm_cpustart.c b/arch/arm/src/armv7-a/arm_cpustart.c index 3cff4589b10..ca883d56de9 100644 --- a/arch/arm/src/armv7-a/arm_cpustart.c +++ b/arch/arm/src/armv7-a/arm_cpustart.c @@ -117,7 +117,7 @@ int arm_start_handler(int irq, FAR void *context, FAR void *arg) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Dump registers so that we can see what is going to happen on return */ diff --git a/arch/arm/src/armv7-a/arm_pgalloc.c b/arch/arm/src/armv7-a/arm_pgalloc.c index 73de6ebf4f6..2109e4f3ec5 100644 --- a/arch/arm/src/armv7-a/arm_pgalloc.c +++ b/arch/arm/src/armv7-a/arm_pgalloc.c @@ -209,7 +209,7 @@ static int get_pgtable(FAR group_addrenv_t *addrenv, uintptr_t vaddr) uintptr_t pgalloc(uintptr_t brkaddr, unsigned int npages) { - FAR struct tcb_s *tcb = sched_self(); + FAR struct tcb_s *tcb = nxsched_self(); FAR struct task_group_s *group; FAR uint32_t *l2table; irqstate_t flags; diff --git a/arch/arm/src/armv7-a/arm_releasepending.c b/arch/arm/src/armv7-a/arm_releasepending.c index 15d76563146..9e954dff3d6 100644 --- a/arch/arm/src/armv7-a/arm_releasepending.c +++ b/arch/arm/src/armv7-a/arm_releasepending.c @@ -63,7 +63,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -83,7 +83,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -117,7 +117,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-a/arm_reprioritizertr.c b/arch/arm/src/armv7-a/arm_reprioritizertr.c index 2877e321dde..4fbc45a57ad 100644 --- a/arch/arm/src/armv7-a/arm_reprioritizertr.c +++ b/arch/arm/src/armv7-a/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -173,7 +173,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c index 989672ffa0c..9888888ef19 100644 --- a/arch/arm/src/armv7-a/arm_syscall.c +++ b/arch/arm/src/armv7-a/arm_syscall.c @@ -169,7 +169,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_syscall_return: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved SYSCALL return address. */ @@ -325,7 +325,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_signal_handler: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -382,7 +382,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_signal_handler_return: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -420,7 +420,7 @@ uint32_t *arm_syscall(uint32_t *regs) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/arm/src/armv7-a/arm_unblocktask.c b/arch/arm/src/armv7-a/arm_unblocktask.c index 415d0d9ad4c..106d08820e2 100644 --- a/arch/arm/src/armv7-a/arm_unblocktask.c +++ b/arch/arm/src/armv7-a/arm_unblocktask.c @@ -92,7 +92,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -155,7 +155,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-m/arm_assert.c b/arch/arm/src/armv7-m/arm_assert.c index 6a62e7aae3a..3383d8b5d67 100644 --- a/arch/arm/src/armv7-m/arm_assert.c +++ b/arch/arm/src/armv7-m/arm_assert.c @@ -138,7 +138,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/arm/src/armv7-m/arm_blocktask.c b/arch/arm/src/armv7-m/arm_blocktask.c index 857473fecc3..af1b0cdee8a 100644 --- a/arch/arm/src/armv7-m/arm_blocktask.c +++ b/arch/arm/src/armv7-m/arm_blocktask.c @@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv7-m/arm_releasepending.c b/arch/arm/src/armv7-m/arm_releasepending.c index efa803b6bdd..1ffc48d11fe 100644 --- a/arch/arm/src/armv7-m/arm_releasepending.c +++ b/arch/arm/src/armv7-m/arm_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -87,7 +87,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -102,7 +102,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv7-m/arm_reprioritizertr.c b/arch/arm/src/armv7-m/arm_reprioritizertr.c index 290bab2dff6..d84d37ae1ca 100644 --- a/arch/arm/src/armv7-m/arm_reprioritizertr.c +++ b/arch/arm/src/armv7-m/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv7-m/arm_svcall.c b/arch/arm/src/armv7-m/arm_svcall.c index b848bfda950..26108589a11 100644 --- a/arch/arm/src/armv7-m/arm_svcall.c +++ b/arch/arm/src/armv7-m/arm_svcall.c @@ -250,7 +250,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_LIB_SYSCALL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -364,7 +364,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -402,7 +402,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -423,7 +423,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/arm/src/armv7-m/arm_unblocktask.c b/arch/arm/src/armv7-m/arm_unblocktask.c index 42bd7f3e6ed..5b5071f4d29 100644 --- a/arch/arm/src/armv7-m/arm_unblocktask.c +++ b/arch/arm/src/armv7-m/arm_unblocktask.c @@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -98,7 +98,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv7-r/arm_assert.c b/arch/arm/src/armv7-r/arm_assert.c index d00dc6de2a5..165e867ebc7 100644 --- a/arch/arm/src/armv7-r/arm_assert.c +++ b/arch/arm/src/armv7-r/arm_assert.c @@ -135,7 +135,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/arm/src/armv7-r/arm_blocktask.c b/arch/arm/src/armv7-r/arm_blocktask.c index 91756f7b9b9..efefdd68ff9 100644 --- a/arch/arm/src/armv7-r/arm_blocktask.c +++ b/arch/arm/src/armv7-r/arm_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. */ @@ -152,7 +152,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-r/arm_releasepending.c b/arch/arm/src/armv7-r/arm_releasepending.c index b6a82e13b17..c5ddf765ce1 100644 --- a/arch/arm/src/armv7-r/arm_releasepending.c +++ b/arch/arm/src/armv7-r/arm_releasepending.c @@ -64,7 +64,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -84,7 +84,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -109,7 +109,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-r/arm_reprioritizertr.c b/arch/arm/src/armv7-r/arm_reprioritizertr.c index 510a9d88e46..5f13b2070fa 100644 --- a/arch/arm/src/armv7-r/arm_reprioritizertr.c +++ b/arch/arm/src/armv7-r/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -164,7 +164,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv7-r/arm_syscall.c b/arch/arm/src/armv7-r/arm_syscall.c index 111757aa4af..fba7fb7b09d 100644 --- a/arch/arm/src/armv7-r/arm_syscall.c +++ b/arch/arm/src/armv7-r/arm_syscall.c @@ -167,7 +167,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_syscall_return: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved SYSCALL return address. */ @@ -323,7 +323,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_signal_handler: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -380,7 +380,7 @@ uint32_t *arm_syscall(uint32_t *regs) case SYS_signal_handler_return: { - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -418,7 +418,7 @@ uint32_t *arm_syscall(uint32_t *regs) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/arm/src/armv7-r/arm_unblocktask.c b/arch/arm/src/armv7-r/arm_unblocktask.c index 0f33eeab8f3..baf24902069 100644 --- a/arch/arm/src/armv7-r/arm_unblocktask.c +++ b/arch/arm/src/armv7-r/arm_unblocktask.c @@ -91,7 +91,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -111,7 +111,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -137,7 +137,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/arm/src/armv8-m/arm_assert.c b/arch/arm/src/armv8-m/arm_assert.c index 514fbb0ed74..b9dced4f901 100755 --- a/arch/arm/src/armv8-m/arm_assert.c +++ b/arch/arm/src/armv8-m/arm_assert.c @@ -138,7 +138,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/arm/src/armv8-m/arm_blocktask.c b/arch/arm/src/armv8-m/arm_blocktask.c index c0b8be826be..240b51ae3fe 100755 --- a/arch/arm/src/armv8-m/arm_blocktask.c +++ b/arch/arm/src/armv8-m/arm_blocktask.c @@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv8-m/arm_releasepending.c b/arch/arm/src/armv8-m/arm_releasepending.c index bee9d575cd2..1a470740dec 100755 --- a/arch/arm/src/armv8-m/arm_releasepending.c +++ b/arch/arm/src/armv8-m/arm_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -87,7 +87,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -102,7 +102,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv8-m/arm_reprioritizertr.c b/arch/arm/src/armv8-m/arm_reprioritizertr.c index db258f97930..2d855fb919b 100755 --- a/arch/arm/src/armv8-m/arm_reprioritizertr.c +++ b/arch/arm/src/armv8-m/arm_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/armv8-m/arm_svcall.c b/arch/arm/src/armv8-m/arm_svcall.c index 5232cc77dec..2da6156da73 100755 --- a/arch/arm/src/armv8-m/arm_svcall.c +++ b/arch/arm/src/armv8-m/arm_svcall.c @@ -250,7 +250,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_LIB_SYSCALL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -364,7 +364,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -402,7 +402,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -423,7 +423,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/arm/src/armv8-m/arm_unblocktask.c b/arch/arm/src/armv8-m/arm_unblocktask.c index 79b47abe709..e4ec9032412 100755 --- a/arch/arm/src/armv8-m/arm_unblocktask.c +++ b/arch/arm/src/armv8-m/arm_unblocktask.c @@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -98,7 +98,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/arm/src/common/arm_exit.c b/arch/arm/src/common/arm_exit.c index a4285d5efa6..261f2aa851f 100644 --- a/arch/arm/src/common/arm_exit.c +++ b/arch/arm/src/common/arm_exit.c @@ -138,12 +138,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -167,7 +167,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/arm/src/cxd56xx/cxd56_cpupause.c b/arch/arm/src/cxd56xx/cxd56_cpupause.c index e6ee4e354a7..b3480bbc3ae 100644 --- a/arch/arm/src/cxd56xx/cxd56_cpupause.c +++ b/arch/arm/src/cxd56xx/cxd56_cpupause.c @@ -212,7 +212,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -245,7 +245,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/arm/src/lc823450/lc823450_cpupause.c b/arch/arm/src/lc823450/lc823450_cpupause.c index 339e4818f43..14ec96c9cdc 100644 --- a/arch/arm/src/lc823450/lc823450_cpupause.c +++ b/arch/arm/src/lc823450/lc823450_cpupause.c @@ -143,7 +143,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -176,7 +176,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/arm/src/lc823450/lc823450_i2s.c b/arch/arm/src/lc823450/lc823450_i2s.c index d14bb14049d..05db1d00702 100644 --- a/arch/arm/src/lc823450/lc823450_i2s.c +++ b/arch/arm/src/lc823450/lc823450_i2s.c @@ -1072,11 +1072,11 @@ FAR struct i2s_dev_s *lc823450_i2sdev_initialize(void) /* Backup the current affinity */ - nxsched_getaffinity(getpid(), sizeof(cpuset0), &cpuset0); + nxsched_get_affinity(getpid(), sizeof(cpuset0), &cpuset0); /* Set the new affinity which assigns to CPU0 */ - nxsched_setaffinity(getpid(), sizeof(cpuset1), &cpuset1); + nxsched_set_affinity(getpid(), sizeof(cpuset1), &cpuset1); nxsig_usleep(10 * 1000); #endif @@ -1089,7 +1089,7 @@ FAR struct i2s_dev_s *lc823450_i2sdev_initialize(void) #ifdef CONFIG_SMP /* Restore the original affinity */ - nxsched_setaffinity(getpid(), sizeof(cpuset0), &cpuset0); + nxsched_set_affinity(getpid(), sizeof(cpuset0), &cpuset0); nxsig_usleep(10 * 1000); #endif diff --git a/arch/arm/src/sam34/sam4cm_cpupause.c b/arch/arm/src/sam34/sam4cm_cpupause.c index 755e6a2146b..775e98d9661 100644 --- a/arch/arm/src/sam34/sam4cm_cpupause.c +++ b/arch/arm/src/sam34/sam4cm_cpupause.c @@ -144,7 +144,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -177,7 +177,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/avr/src/avr/up_blocktask.c b/arch/avr/src/avr/up_blocktask.c index bfc21e61f22..8db6d1b8e52 100644 --- a/arch/avr/src/avr/up_blocktask.c +++ b/arch/avr/src/avr/up_blocktask.c @@ -109,7 +109,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -144,7 +144,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/avr/src/avr/up_releasepending.c b/arch/avr/src/avr/up_releasepending.c index 848e24e411e..47eff4be11a 100644 --- a/arch/avr/src/avr/up_releasepending.c +++ b/arch/avr/src/avr/up_releasepending.c @@ -79,7 +79,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); if (g_current_regs) { @@ -97,7 +97,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -112,7 +112,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/avr/src/avr/up_reprioritizertr.c b/arch/avr/src/avr/up_reprioritizertr.c index e884669e290..10dc23bfac3 100644 --- a/arch/avr/src/avr/up_reprioritizertr.c +++ b/arch/avr/src/avr/up_reprioritizertr.c @@ -133,7 +133,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -153,7 +153,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -168,7 +168,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/avr/src/avr/up_unblocktask.c b/arch/avr/src/avr/up_unblocktask.c index 6455dc7b235..d369726ebdc 100644 --- a/arch/avr/src/avr/up_unblocktask.c +++ b/arch/avr/src/avr/up_unblocktask.c @@ -93,7 +93,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ @@ -128,7 +128,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Switch context to the context of the task at the head of the * ready to run list. diff --git a/arch/avr/src/avr32/up_blocktask.c b/arch/avr/src/avr32/up_blocktask.c index 0365ae6be1a..759c8d39868 100644 --- a/arch/avr/src/avr32/up_blocktask.c +++ b/arch/avr/src/avr32/up_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any new address environment needed by * the new thread will be instantiated before the return from @@ -161,7 +161,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/avr/src/avr32/up_releasepending.c b/arch/avr/src/avr32/up_releasepending.c index 0e448e7061c..d67efc0a5fe 100644 --- a/arch/avr/src/avr32/up_releasepending.c +++ b/arch/avr/src/avr32/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -100,7 +100,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -130,7 +130,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexs */ diff --git a/arch/avr/src/avr32/up_reprioritizertr.c b/arch/avr/src/avr32/up_reprioritizertr.c index dbb64fdb7f2..907e9902c02 100644 --- a/arch/avr/src/avr32/up_reprioritizertr.c +++ b/arch/avr/src/avr32/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -184,7 +184,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/avr/src/avr32/up_unblocktask.c b/arch/avr/src/avr32/up_unblocktask.c index b0dbabfda12..1afbf66630f 100644 --- a/arch/avr/src/avr32/up_unblocktask.c +++ b/arch/avr/src/avr32/up_unblocktask.c @@ -94,7 +94,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any new address environment needed by * the new thread will be instantiated before the return from @@ -146,7 +146,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/up_exit.c index 5708f486235..ef91c8b197f 100644 --- a/arch/avr/src/common/up_exit.c +++ b/arch/avr/src/common/up_exit.c @@ -153,12 +153,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -182,7 +182,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/hc/src/common/up_blocktask.c b/arch/hc/src/common/up_blocktask.c index b17206e71c3..c78a81608ff 100644 --- a/arch/hc/src/common/up_blocktask.c +++ b/arch/hc/src/common/up_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -163,7 +163,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/up_exit.c index b3e52da303b..85eddee44ba 100644 --- a/arch/hc/src/common/up_exit.c +++ b/arch/hc/src/common/up_exit.c @@ -153,12 +153,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -182,7 +182,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/hc/src/common/up_releasepending.c b/arch/hc/src/common/up_releasepending.c index bbbb4278a2a..cd61185b680 100644 --- a/arch/hc/src/common/up_releasepending.c +++ b/arch/hc/src/common/up_releasepending.c @@ -79,7 +79,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -99,7 +99,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -133,7 +133,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/hc/src/common/up_reprioritizertr.c b/arch/hc/src/common/up_reprioritizertr.c index 1bd8fa27622..891d86704c5 100644 --- a/arch/hc/src/common/up_reprioritizertr.c +++ b/arch/hc/src/common/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -187,7 +187,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/hc/src/common/up_unblocktask.c b/arch/hc/src/common/up_unblocktask.c index 7f92980262f..06f7d9a763c 100644 --- a/arch/hc/src/common/up_unblocktask.c +++ b/arch/hc/src/common/up_unblocktask.c @@ -94,7 +94,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -149,7 +149,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/mips/src/common/mips_exit.c b/arch/mips/src/common/mips_exit.c index a6fc5eebefd..ec5c0e112b0 100644 --- a/arch/mips/src/common/mips_exit.c +++ b/arch/mips/src/common/mips_exit.c @@ -155,12 +155,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -184,7 +184,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/mips/src/mips32/mips_blocktask.c b/arch/mips/src/mips32/mips_blocktask.c index b9b3db0447c..82a1cbdce8b 100644 --- a/arch/mips/src/mips32/mips_blocktask.c +++ b/arch/mips/src/mips32/mips_blocktask.c @@ -111,7 +111,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -131,7 +131,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -161,7 +161,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/mips/src/mips32/mips_releasepending.c b/arch/mips/src/mips32/mips_releasepending.c index 45ea59b009d..bddf88e0b66 100644 --- a/arch/mips/src/mips32/mips_releasepending.c +++ b/arch/mips/src/mips32/mips_releasepending.c @@ -83,7 +83,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -103,7 +103,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -133,7 +133,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/mips/src/mips32/mips_reprioritizertr.c b/arch/mips/src/mips32/mips_reprioritizertr.c index f905bf3ef38..05472826196 100644 --- a/arch/mips/src/mips32/mips_reprioritizertr.c +++ b/arch/mips/src/mips32/mips_reprioritizertr.c @@ -136,7 +136,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -156,7 +156,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -186,7 +186,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/mips/src/mips32/mips_swint0.c b/arch/mips/src/mips32/mips_swint0.c index bd497468d27..62025376014 100644 --- a/arch/mips/src/mips32/mips_swint0.c +++ b/arch/mips/src/mips32/mips_swint0.c @@ -216,7 +216,7 @@ int up_swint0(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_KERNEL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -249,7 +249,7 @@ int up_swint0(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_BUILD_KERNEL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/mips/src/mips32/mips_unblocktask.c b/arch/mips/src/mips32/mips_unblocktask.c index ca9f08fcbf6..73b2168ef5d 100644 --- a/arch/mips/src/mips32/mips_unblocktask.c +++ b/arch/mips/src/mips32/mips_unblocktask.c @@ -96,7 +96,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -147,7 +147,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/lm32/lm32_blocktask.c b/arch/misoc/src/lm32/lm32_blocktask.c index 30da7c12729..7f4c60e24ef 100644 --- a/arch/misoc/src/lm32/lm32_blocktask.c +++ b/arch/misoc/src/lm32/lm32_blocktask.c @@ -112,7 +112,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -132,7 +132,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -162,7 +162,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/lm32/lm32_exit.c b/arch/misoc/src/lm32/lm32_exit.c index 832b8ab1da7..93a9e9f3c03 100644 --- a/arch/misoc/src/lm32/lm32_exit.c +++ b/arch/misoc/src/lm32/lm32_exit.c @@ -148,12 +148,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -177,7 +177,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/misoc/src/lm32/lm32_releasepending.c b/arch/misoc/src/lm32/lm32_releasepending.c index f4620798b1e..b4880928b2a 100644 --- a/arch/misoc/src/lm32/lm32_releasepending.c +++ b/arch/misoc/src/lm32/lm32_releasepending.c @@ -83,7 +83,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -103,7 +103,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -133,7 +133,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/lm32/lm32_reprioritizertr.c b/arch/misoc/src/lm32/lm32_reprioritizertr.c index b03a505853a..2a7bfc0fd25 100644 --- a/arch/misoc/src/lm32/lm32_reprioritizertr.c +++ b/arch/misoc/src/lm32/lm32_reprioritizertr.c @@ -136,7 +136,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -156,7 +156,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -186,7 +186,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/lm32/lm32_swint.c b/arch/misoc/src/lm32/lm32_swint.c index 28598b3d4ee..d909ca71d0d 100644 --- a/arch/misoc/src/lm32/lm32_swint.c +++ b/arch/misoc/src/lm32/lm32_swint.c @@ -213,7 +213,7 @@ int lm32_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_KERNEL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -246,7 +246,7 @@ int lm32_swint(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_BUILD_KERNEL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/misoc/src/lm32/lm32_unblocktask.c b/arch/misoc/src/lm32/lm32_unblocktask.c index 01d5eaf332f..90050de7c1e 100644 --- a/arch/misoc/src/lm32/lm32_unblocktask.c +++ b/arch/misoc/src/lm32/lm32_unblocktask.c @@ -97,7 +97,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -117,7 +117,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -148,7 +148,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/minerva/minerva_blocktask.c b/arch/misoc/src/minerva/minerva_blocktask.c index 6772f69c9e5..174bc75b949 100644 --- a/arch/misoc/src/minerva/minerva_blocktask.c +++ b/arch/misoc/src/minerva/minerva_blocktask.c @@ -112,7 +112,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -132,7 +132,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. @@ -160,7 +160,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/minerva/minerva_exit.c b/arch/misoc/src/minerva/minerva_exit.c index 634ed08d8e5..930c9f68f17 100644 --- a/arch/misoc/src/minerva/minerva_exit.c +++ b/arch/misoc/src/minerva/minerva_exit.c @@ -146,12 +146,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -175,7 +175,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/misoc/src/minerva/minerva_releasepending.c b/arch/misoc/src/minerva/minerva_releasepending.c index bdd7d94444a..9f0947a4bed 100644 --- a/arch/misoc/src/minerva/minerva_releasepending.c +++ b/arch/misoc/src/minerva/minerva_releasepending.c @@ -82,7 +82,7 @@ void up_release_pending(void) * contexts. Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -102,7 +102,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. @@ -132,7 +132,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/minerva/minerva_reprioritizertr.c b/arch/misoc/src/minerva/minerva_reprioritizertr.c index 005e631b4c3..c661e553a64 100644 --- a/arch/misoc/src/minerva/minerva_reprioritizertr.c +++ b/arch/misoc/src/minerva/minerva_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -184,7 +184,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/misoc/src/minerva/minerva_swint.c b/arch/misoc/src/minerva/minerva_swint.c index 298bee487c5..f8f8902e567 100644 --- a/arch/misoc/src/minerva/minerva_swint.c +++ b/arch/misoc/src/minerva/minerva_swint.c @@ -200,7 +200,7 @@ int minerva_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_KERNEL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -233,7 +233,7 @@ int minerva_swint(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_BUILD_KERNEL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/misoc/src/minerva/minerva_unblocktask.c b/arch/misoc/src/minerva/minerva_unblocktask.c index d3e895a3502..20eab94d916 100644 --- a/arch/misoc/src/minerva/minerva_unblocktask.c +++ b/arch/misoc/src/minerva/minerva_unblocktask.c @@ -97,7 +97,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -117,7 +117,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. @@ -148,7 +148,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/or1k/src/common/up_assert.c b/arch/or1k/src/common/up_assert.c index 8a7a354804e..d2a6170eacf 100644 --- a/arch/or1k/src/common/up_assert.c +++ b/arch/or1k/src/common/up_assert.c @@ -155,7 +155,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/or1k/src/common/up_blocktask.c b/arch/or1k/src/common/up_blocktask.c index b72bc7f8a43..732c0b21088 100644 --- a/arch/or1k/src/common/up_blocktask.c +++ b/arch/or1k/src/common/up_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -163,7 +163,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/or1k/src/common/up_exit.c b/arch/or1k/src/common/up_exit.c index ef77d6367aa..fd2cd7a7262 100644 --- a/arch/or1k/src/common/up_exit.c +++ b/arch/or1k/src/common/up_exit.c @@ -153,12 +153,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -182,7 +182,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/or1k/src/common/up_releasepending.c b/arch/or1k/src/common/up_releasepending.c index 4dd0937d445..e7072d80dd4 100644 --- a/arch/or1k/src/common/up_releasepending.c +++ b/arch/or1k/src/common/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -100,7 +100,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -134,7 +134,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/or1k/src/common/up_reprioritizertr.c b/arch/or1k/src/common/up_reprioritizertr.c index 76560c6b60a..5b7645995ad 100644 --- a/arch/or1k/src/common/up_reprioritizertr.c +++ b/arch/or1k/src/common/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -187,7 +187,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/or1k/src/common/up_unblocktask.c b/arch/or1k/src/common/up_unblocktask.c index 3d3f1986e36..c9ba8038af3 100644 --- a/arch/or1k/src/common/up_unblocktask.c +++ b/arch/or1k/src/common/up_unblocktask.c @@ -94,7 +94,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -115,7 +115,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -150,7 +150,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/renesas/src/common/up_blocktask.c b/arch/renesas/src/common/up_blocktask.c index 2ec6b2be417..ecc3f8d2a2b 100644 --- a/arch/renesas/src/common/up_blocktask.c +++ b/arch/renesas/src/common/up_blocktask.c @@ -109,7 +109,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -162,7 +162,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/renesas/src/common/up_exit.c b/arch/renesas/src/common/up_exit.c index fc2e9232317..a7529614c27 100644 --- a/arch/renesas/src/common/up_exit.c +++ b/arch/renesas/src/common/up_exit.c @@ -153,12 +153,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -182,7 +182,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/renesas/src/common/up_releasepending.c b/arch/renesas/src/common/up_releasepending.c index 6ef59391836..49cc32f6e0c 100644 --- a/arch/renesas/src/common/up_releasepending.c +++ b/arch/renesas/src/common/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -100,7 +100,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -134,7 +134,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/renesas/src/common/up_reprioritizertr.c b/arch/renesas/src/common/up_reprioritizertr.c index 9940d675c8b..44b9f6f7a03 100644 --- a/arch/renesas/src/common/up_reprioritizertr.c +++ b/arch/renesas/src/common/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -187,7 +187,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/renesas/src/common/up_unblocktask.c b/arch/renesas/src/common/up_unblocktask.c index 3ca1e79e98f..386c61ae185 100644 --- a/arch/renesas/src/common/up_unblocktask.c +++ b/arch/renesas/src/common/up_unblocktask.c @@ -94,7 +94,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -114,7 +114,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -149,7 +149,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/common/riscv_exit.c b/arch/risc-v/src/common/riscv_exit.c index 59d8799eba5..94b13b56b84 100644 --- a/arch/risc-v/src/common/riscv_exit.c +++ b/arch/risc-v/src/common/riscv_exit.c @@ -155,12 +155,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -184,7 +184,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/k210/k210_cpupause.c b/arch/risc-v/src/k210/k210_cpupause.c index c5a0af16069..88af7835118 100644 --- a/arch/risc-v/src/k210/k210_cpupause.c +++ b/arch/risc-v/src/k210/k210_cpupause.c @@ -142,7 +142,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -175,7 +175,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/risc-v/src/rv32im/riscv_assert.c b/arch/risc-v/src/rv32im/riscv_assert.c index f0688ed98b4..84004809d1d 100644 --- a/arch/risc-v/src/rv32im/riscv_assert.c +++ b/arch/risc-v/src/rv32im/riscv_assert.c @@ -127,7 +127,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/risc-v/src/rv32im/riscv_blocktask.c b/arch/risc-v/src/rv32im/riscv_blocktask.c index 7ee27d4e9b1..7fa6a8b2a0f 100644 --- a/arch/risc-v/src/rv32im/riscv_blocktask.c +++ b/arch/risc-v/src/rv32im/riscv_blocktask.c @@ -111,7 +111,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -131,7 +131,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -161,7 +161,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv32im/riscv_releasepending.c b/arch/risc-v/src/rv32im/riscv_releasepending.c index 799be8451a8..f825745af1d 100644 --- a/arch/risc-v/src/rv32im/riscv_releasepending.c +++ b/arch/risc-v/src/rv32im/riscv_releasepending.c @@ -83,7 +83,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -103,7 +103,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -133,7 +133,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv32im/riscv_reprioritizertr.c b/arch/risc-v/src/rv32im/riscv_reprioritizertr.c index f33f4529eb8..1bea1ddd93d 100644 --- a/arch/risc-v/src/rv32im/riscv_reprioritizertr.c +++ b/arch/risc-v/src/rv32im/riscv_reprioritizertr.c @@ -136,7 +136,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -156,7 +156,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -186,7 +186,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv32im/riscv_swint.c b/arch/risc-v/src/rv32im/riscv_swint.c index 471c676523f..21712f51efe 100644 --- a/arch/risc-v/src/rv32im/riscv_swint.c +++ b/arch/risc-v/src/rv32im/riscv_swint.c @@ -217,7 +217,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_KERNEL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -250,7 +250,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_BUILD_KERNEL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/risc-v/src/rv32im/riscv_unblocktask.c b/arch/risc-v/src/rv32im/riscv_unblocktask.c index 9d7d8e89538..739b8b7f4d7 100644 --- a/arch/risc-v/src/rv32im/riscv_unblocktask.c +++ b/arch/risc-v/src/rv32im/riscv_unblocktask.c @@ -96,7 +96,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -147,7 +147,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv64gc/riscv_assert.c b/arch/risc-v/src/rv64gc/riscv_assert.c index cae90de17fe..61376b5a60e 100644 --- a/arch/risc-v/src/rv64gc/riscv_assert.c +++ b/arch/risc-v/src/rv64gc/riscv_assert.c @@ -129,7 +129,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/risc-v/src/rv64gc/riscv_blocktask.c b/arch/risc-v/src/rv64gc/riscv_blocktask.c index 1701ae9ccc0..ce07e638802 100644 --- a/arch/risc-v/src/rv64gc/riscv_blocktask.c +++ b/arch/risc-v/src/rv64gc/riscv_blocktask.c @@ -111,7 +111,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -131,7 +131,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -161,7 +161,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv64gc/riscv_releasepending.c b/arch/risc-v/src/rv64gc/riscv_releasepending.c index 312b6c6b4ce..6009e5e3cb8 100644 --- a/arch/risc-v/src/rv64gc/riscv_releasepending.c +++ b/arch/risc-v/src/rv64gc/riscv_releasepending.c @@ -83,7 +83,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -103,7 +103,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -133,7 +133,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv64gc/riscv_reprioritizertr.c b/arch/risc-v/src/rv64gc/riscv_reprioritizertr.c index 00e8c3d31ee..13990b74c0f 100644 --- a/arch/risc-v/src/rv64gc/riscv_reprioritizertr.c +++ b/arch/risc-v/src/rv64gc/riscv_reprioritizertr.c @@ -136,7 +136,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -156,7 +156,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -186,7 +186,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/risc-v/src/rv64gc/riscv_swint.c b/arch/risc-v/src/rv64gc/riscv_swint.c index 59c3c4b7874..8061102f28a 100644 --- a/arch/risc-v/src/rv64gc/riscv_swint.c +++ b/arch/risc-v/src/rv64gc/riscv_swint.c @@ -228,7 +228,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_LIB_SYSCALL case SYS_syscall_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); int index = (int)rtcb->xcp.nsyscalls - 1; /* Make sure that there is a saved syscall return address. */ @@ -344,7 +344,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Remember the caller's return address */ @@ -382,7 +382,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_BUILD_PROTECTED case SYS_signal_handler_return: { - struct tcb_s *rtcb = sched_self(); + struct tcb_s *rtcb = nxsched_self(); /* Set up to return to the kernel-mode signal dispatching logic. */ @@ -403,7 +403,7 @@ int up_swint(int irq, FAR void *context, FAR void *arg) default: { #ifdef CONFIG_LIB_SYSCALL - FAR struct tcb_s *rtcb = sched_self(); + FAR struct tcb_s *rtcb = nxsched_self(); int index = rtcb->xcp.nsyscalls; /* Verify that the SYS call number is within range */ diff --git a/arch/risc-v/src/rv64gc/riscv_unblocktask.c b/arch/risc-v/src/rv64gc/riscv_unblocktask.c index 142ef0bc2bb..01b40a5b75e 100644 --- a/arch/risc-v/src/rv64gc/riscv_unblocktask.c +++ b/arch/risc-v/src/rv64gc/riscv_unblocktask.c @@ -96,7 +96,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -147,7 +147,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(nexttcb); + nxsched_resume_scheduler(nexttcb); /* Then switch contexts */ diff --git a/arch/sim/src/sim/up_blocktask.c b/arch/sim/src/sim/up_blocktask.c index c527dda0cb1..a8bc9b28d74 100644 --- a/arch/sim/src/sim/up_blocktask.c +++ b/arch/sim/src/sim/up_blocktask.c @@ -111,7 +111,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Copy the exception context into the TCB at the (old) head of the * ready-to-run Task list. if up_setjmp returns a non-zero @@ -141,7 +141,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/sim/src/sim/up_exit.c b/arch/sim/src/sim/up_exit.c index d9d36832c22..3e9b2b30831 100644 --- a/arch/sim/src/sim/up_exit.c +++ b/arch/sim/src/sim/up_exit.c @@ -71,7 +71,7 @@ void _exit(int status) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -86,7 +86,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt diff --git a/arch/sim/src/sim/up_releasepending.c b/arch/sim/src/sim/up_releasepending.c index 72f7bc1f48b..113ec2a02a7 100644 --- a/arch/sim/src/sim/up_releasepending.c +++ b/arch/sim/src/sim/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Copy the exception context into the TCB of the task that was * currently active. if up_setjmp returns a non-zero value, then @@ -110,7 +110,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/sim/src/sim/up_reprioritizertr.c b/arch/sim/src/sim/up_reprioritizertr.c index 4dddc35d696..6347a4e4123 100644 --- a/arch/sim/src/sim/up_reprioritizertr.c +++ b/arch/sim/src/sim/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Copy the exception context into the TCB at the (old) head of the * ready-to-run Task list. if up_setjmp returns a non-zero @@ -165,7 +165,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/sim/src/sim/up_smpsignal.c b/arch/sim/src/sim/up_smpsignal.c index e3fac4cae4f..eabeb1aaede 100644 --- a/arch/sim/src/sim/up_smpsignal.c +++ b/arch/sim/src/sim/up_smpsignal.c @@ -103,7 +103,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Copy the exception context into the TCB at the (old) head of the * CPUs assigned task list. if up_setjmp returns a non-zero value, then @@ -147,7 +147,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/sim/src/sim/up_unblocktask.c b/arch/sim/src/sim/up_unblocktask.c index bf9ca4f136e..a2eb19f7320 100644 --- a/arch/sim/src/sim/up_unblocktask.c +++ b/arch/sim/src/sim/up_unblocktask.c @@ -94,7 +94,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Copy the exception context into the TCB of the task that was * previously active. if up_setjmp returns a non-zero value, then @@ -125,7 +125,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86/src/common/up_blocktask.c b/arch/x86/src/common/up_blocktask.c index 7f068e275a2..eabf4ca3a1b 100644 --- a/arch/x86/src/common/up_blocktask.c +++ b/arch/x86/src/common/up_blocktask.c @@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -163,7 +163,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/up_exit.c index 9f730087d1a..498c49b1003 100644 --- a/arch/x86/src/common/up_exit.c +++ b/arch/x86/src/common/up_exit.c @@ -153,12 +153,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -182,7 +182,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/x86/src/common/up_releasepending.c b/arch/x86/src/common/up_releasepending.c index 264e96549d0..7cf060a71dc 100644 --- a/arch/x86/src/common/up_releasepending.c +++ b/arch/x86/src/common/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -100,7 +100,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -134,7 +134,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86/src/common/up_reprioritizertr.c b/arch/x86/src/common/up_reprioritizertr.c index 779dee7f87f..83149c184ce 100644 --- a/arch/x86/src/common/up_reprioritizertr.c +++ b/arch/x86/src/common/up_reprioritizertr.c @@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -187,7 +187,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86/src/common/up_unblocktask.c b/arch/x86/src/common/up_unblocktask.c index 08be81d3b60..475972bcb96 100644 --- a/arch/x86/src/common/up_unblocktask.c +++ b/arch/x86/src/common/up_unblocktask.c @@ -93,7 +93,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -148,7 +148,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86_64/src/common/up_blocktask.c b/arch/x86_64/src/common/up_blocktask.c index 5e912225257..fb4fa67735d 100644 --- a/arch/x86_64/src/common/up_blocktask.c +++ b/arch/x86_64/src/common/up_blocktask.c @@ -95,7 +95,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -150,7 +150,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86_64/src/common/up_exit.c b/arch/x86_64/src/common/up_exit.c index 50f3b5a735d..eec9a641dba 100644 --- a/arch/x86_64/src/common/up_exit.c +++ b/arch/x86_64/src/common/up_exit.c @@ -141,7 +141,7 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Destroy the task at the head of the ready to run list. */ diff --git a/arch/x86_64/src/common/up_releasepending.c b/arch/x86_64/src/common/up_releasepending.c index 95440cb08f1..98481e15353 100644 --- a/arch/x86_64/src/common/up_releasepending.c +++ b/arch/x86_64/src/common/up_releasepending.c @@ -64,7 +64,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -85,7 +85,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -120,7 +120,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86_64/src/common/up_reprioritizertr.c b/arch/x86_64/src/common/up_reprioritizertr.c index d1053a3ea96..9c68034c6c7 100644 --- a/arch/x86_64/src/common/up_reprioritizertr.c +++ b/arch/x86_64/src/common/up_reprioritizertr.c @@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -140,7 +140,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -174,7 +174,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/x86_64/src/common/up_unblocktask.c b/arch/x86_64/src/common/up_unblocktask.c index 585c46317d1..1f07cc38489 100644 --- a/arch/x86_64/src/common/up_unblocktask.c +++ b/arch/x86_64/src/common/up_unblocktask.c @@ -80,7 +80,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -101,7 +101,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -137,7 +137,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/common/xtensa_blocktask.c b/arch/xtensa/src/common/xtensa_blocktask.c index 87d76035b04..197504da22e 100644 --- a/arch/xtensa/src/common/xtensa_blocktask.c +++ b/arch/xtensa/src/common/xtensa_blocktask.c @@ -111,7 +111,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -131,7 +131,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -178,7 +178,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/common/xtensa_cpupause.c b/arch/xtensa/src/common/xtensa_cpupause.c index 3ede912784c..a3452d5251f 100644 --- a/arch/xtensa/src/common/xtensa_cpupause.c +++ b/arch/xtensa/src/common/xtensa_cpupause.c @@ -115,7 +115,7 @@ int up_cpu_paused(int cpu) /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify that we are paused */ @@ -148,7 +148,7 @@ int up_cpu_paused(int cpu) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts. Any necessary address environment changes * will be made when the interrupt returns. diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c index c5c58eb1d19..42274f70e2f 100644 --- a/arch/xtensa/src/common/xtensa_dumpstate.c +++ b/arch/xtensa/src/common/xtensa_dumpstate.c @@ -114,7 +114,7 @@ static inline void up_showtasks(void) { /* Dump interesting properties of each task in the crash environment */ - sched_foreach(up_taskdump, NULL); + nxsched_foreach(up_taskdump, NULL); } #else # define up_showtasks() diff --git a/arch/xtensa/src/common/xtensa_exit.c b/arch/xtensa/src/common/xtensa_exit.c index ad2de1ba2ba..6c465ae1b94 100644 --- a/arch/xtensa/src/common/xtensa_exit.c +++ b/arch/xtensa/src/common/xtensa_exit.c @@ -154,12 +154,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_xtensa_dumponexit, NULL); + nxsched_foreach(_xtensa_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); #if XCHAL_CP_NUM > 0 /* Disable co-processor support for the task that is exit-ing. */ @@ -195,7 +195,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/common/xtensa_releasepending.c b/arch/xtensa/src/common/xtensa_releasepending.c index 50795f40756..b63ba175106 100644 --- a/arch/xtensa/src/common/xtensa_releasepending.c +++ b/arch/xtensa/src/common/xtensa_releasepending.c @@ -83,7 +83,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -103,7 +103,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -150,7 +150,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/common/xtensa_reprioritizertr.c b/arch/xtensa/src/common/xtensa_reprioritizertr.c index 80af6860cf8..5f7ea6805d8 100644 --- a/arch/xtensa/src/common/xtensa_reprioritizertr.c +++ b/arch/xtensa/src/common/xtensa_reprioritizertr.c @@ -136,7 +136,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -156,7 +156,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -203,7 +203,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/common/xtensa_unblocktask.c b/arch/xtensa/src/common/xtensa_unblocktask.c index 0069be2e5b6..4727046d0be 100644 --- a/arch/xtensa/src/common/xtensa_unblocktask.c +++ b/arch/xtensa/src/common/xtensa_unblocktask.c @@ -96,7 +96,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts. Any necessary address environment * changes will be made when the interrupt returns. @@ -165,7 +165,7 @@ void up_unblock_task(struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/xtensa/src/esp32/esp32_cpustart.c b/arch/xtensa/src/esp32/esp32_cpustart.c index 14e8de06bb8..fb481100ed4 100644 --- a/arch/xtensa/src/esp32/esp32_cpustart.c +++ b/arch/xtensa/src/esp32/esp32_cpustart.c @@ -191,7 +191,7 @@ void xtensa_appcpu_start(void) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Move CPU0 exception vectors to IRAM */ diff --git a/arch/z16/src/common/z16_blocktask.c b/arch/z16/src/common/z16_blocktask.c index a0a6a2539de..b44d105dd36 100644 --- a/arch/z16/src/common/z16_blocktask.c +++ b/arch/z16/src/common/z16_blocktask.c @@ -96,7 +96,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -116,7 +116,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -140,7 +140,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z16/src/common/z16_exit.c b/arch/z16/src/common/z16_exit.c index 17e6fe3aa5e..d979cdf8d8d 100644 --- a/arch/z16/src/common/z16_exit.c +++ b/arch/z16/src/common/z16_exit.c @@ -137,12 +137,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_z16_dumponexit, NULL); + nxsched_foreach(_z16_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -157,7 +157,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/z16/src/common/z16_releasepending.c b/arch/z16/src/common/z16_releasepending.c index 0ebe5c79750..9fd93eae849 100644 --- a/arch/z16/src/common/z16_releasepending.c +++ b/arch/z16/src/common/z16_releasepending.c @@ -65,7 +65,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -85,7 +85,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -110,7 +110,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z16/src/common/z16_reprioritizertr.c b/arch/z16/src/common/z16_reprioritizertr.c index 62fe26694dd..499ae0b6de6 100644 --- a/arch/z16/src/common/z16_reprioritizertr.c +++ b/arch/z16/src/common/z16_reprioritizertr.c @@ -120,7 +120,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -140,7 +140,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -165,7 +165,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z16/src/common/z16_unblocktask.c b/arch/z16/src/common/z16_unblocktask.c index 1ba8fe54f76..0b55619c1f1 100644 --- a/arch/z16/src/common/z16_unblocktask.c +++ b/arch/z16/src/common/z16_unblocktask.c @@ -82,7 +82,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -102,7 +102,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -128,7 +128,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z80/src/common/z80_blocktask.c b/arch/z80/src/common/z80_blocktask.c index 2eb5bc1ad2e..ad962c8eb16 100644 --- a/arch/z80/src/common/z80_blocktask.c +++ b/arch/z80/src/common/z80_blocktask.c @@ -98,7 +98,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) { /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -118,7 +118,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. Any necessary address environment @@ -152,7 +152,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) #endif /* Reset scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z80/src/common/z80_exit.c b/arch/z80/src/common/z80_exit.c index ee6e708d38f..51bf0a9f14f 100644 --- a/arch/z80/src/common/z80_exit.c +++ b/arch/z80/src/common/z80_exit.c @@ -139,12 +139,12 @@ void _exit(int status) #ifdef CONFIG_DUMP_ON_EXIT sinfo("Other tasks:\n"); - sched_foreach(_up_dumponexit, NULL); + nxsched_foreach(_up_dumponexit, NULL); #endif /* Update scheduler parameters */ - sched_suspend_scheduler(tcb); + nxsched_suspend_scheduler(tcb); /* Destroy the task at the head of the ready to run list. */ @@ -169,7 +169,7 @@ void _exit(int status) /* Reset scheduler parameters */ - sched_resume_scheduler(tcb); + nxsched_resume_scheduler(tcb); /* Then switch contexts */ diff --git a/arch/z80/src/common/z80_releasepending.c b/arch/z80/src/common/z80_releasepending.c index bf8a821716e..c7214ff6abc 100644 --- a/arch/z80/src/common/z80_releasepending.c +++ b/arch/z80/src/common/z80_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) * Update scheduler parameters. */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we operating in interrupt context? */ @@ -87,7 +87,7 @@ void up_release_pending(void) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. Any necessary address environment @@ -122,7 +122,7 @@ void up_release_pending(void) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z80/src/common/z80_reprioritizertr.c b/arch/z80/src/common/z80_reprioritizertr.c index 0d385098ce9..2ab11034d9b 100644 --- a/arch/z80/src/common/z80_reprioritizertr.c +++ b/arch/z80/src/common/z80_reprioritizertr.c @@ -122,7 +122,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -142,7 +142,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. Any necessary address environment @@ -177,7 +177,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/arch/z80/src/common/z80_unblocktask.c b/arch/z80/src/common/z80_unblocktask.c index f9b6bc96f59..c49824d8cd8 100644 --- a/arch/z80/src/common/z80_unblocktask.c +++ b/arch/z80/src/common/z80_unblocktask.c @@ -84,7 +84,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_suspend_scheduler(rtcb); + nxsched_suspend_scheduler(rtcb); /* Are we in an interrupt handler? */ @@ -104,7 +104,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. Any necessary address environment @@ -140,7 +140,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) #endif /* Update scheduler parameters */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); /* Then switch contexts */ diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index ad1bff0c989..b5d86f32771 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -276,7 +276,7 @@ int exec_module(FAR const struct binary_s *binp) errout_with_tcbinit: tcb->cmn.stack_alloc_ptr = NULL; - sched_releasetcb(&tcb->cmn, TCB_FLAG_TTYPE_TASK); + nxsched_release_tcb(&tcb->cmn, TCB_FLAG_TTYPE_TASK); kumm_free(stack); return ret; diff --git a/binfmt/binfmt_loadmodule.c b/binfmt/binfmt_loadmodule.c index 617d33924c9..236ebc5efb4 100644 --- a/binfmt/binfmt_loadmodule.c +++ b/binfmt/binfmt_loadmodule.c @@ -78,10 +78,10 @@ static int load_default_priority(FAR struct binary_s *bin) /* Get the priority of this thread */ - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { - berr("ERROR: nxsched_getparam failed: %d\n", ret); + berr("ERROR: nxsched_get_param failed: %d\n", ret); return ret; } diff --git a/binfmt/nxflat.c b/binfmt/nxflat.c index f3c303ee93f..94d6397ec58 100644 --- a/binfmt/nxflat.c +++ b/binfmt/nxflat.c @@ -263,7 +263,7 @@ static int nxflat_unloadbinary(FAR struct binary_s *binp) binp->alloc[0] = NULL; /* The reference count will be decremented to zero and the dspace - * container will be freed in sched/sched_releasetcb.c + * container will be freed in sched/nxsched_release_tcb.c */ } diff --git a/boards/arm/imx6/sabre-6quad/README.txt b/boards/arm/imx6/sabre-6quad/README.txt index f8385ed0281..cc80d3bcf5a 100644 --- a/boards/arm/imx6/sabre-6quad/README.txt +++ b/boards/arm/imx6/sabre-6quad/README.txt @@ -131,7 +131,7 @@ Status Several fixes were needed mostly due to: (1) The new version of this_task() that calls sched_lock() and sched_unlock(), and (2) to deferred setting g_cpu_irqlock(). That latter setting is now deferred - until sched_resume_scheduler() runs. These commits were made: + until nxsched_resume_scheduler() runs. These commits were made: commit 50ab5d638a37b539775d1e60085f182bf26be57f sched/task: It is not appropriate for logic in nxtask_exit() to call diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c index db3a341708a..2becb5d1c04 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c @@ -60,7 +60,7 @@ extern void *pthread_mutex_init; extern void *pthread_mutex_lock; extern void *pthread_mutex_unlock; extern void *puts; -extern void *sched_getstreams; +extern void *nxsched_get_streams; extern void *sem_destroy; extern void *sem_init; extern void *sem_post; @@ -91,7 +91,7 @@ const struct symtab_s lpc17_40_exports[] = {"pthread_mutex_lock", &pthread_mutex_lock}, {"pthread_mutex_unlock", &pthread_mutex_unlock}, {"puts", &puts}, - {"sched_getstreams", &sched_getstreams}, + {"nxsched_get_streams", &nxsched_get_streams}, {"sem_destroy", &sem_destroy}, {"sem_init", &sem_init}, {"sem_post", &sem_post}, diff --git a/boards/sim/sim/sim/src/sim_touchscreen.c b/boards/sim/sim/sim/src/sim_touchscreen.c index e830c0ab3ae..9575f5c3622 100644 --- a/boards/sim/sim/sim/src/sim_touchscreen.c +++ b/boards/sim/sim/sim/src/sim_touchscreen.c @@ -174,10 +174,10 @@ int sim_tsc_setup(int minor) /* Set the client task priority */ param.sched_priority = CONFIG_SIM_CLIENTPRIO; - ret = nxsched_setparam(0, ¶m); + ret = nxsched_set_param(0, ¶m); if (ret < 0) { - gerr("ERROR: nxsched_setparam failed: %d\n" , ret); + gerr("ERROR: nxsched_set_param failed: %d\n" , ret); return ret; } diff --git a/fs/aio/aioc_contain.c b/fs/aio/aioc_contain.c index ac0984ff74e..083343c90c5 100644 --- a/fs/aio/aioc_contain.c +++ b/fs/aio/aioc_contain.c @@ -121,7 +121,7 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp) aioc->aioc_pid = getpid(); #ifdef CONFIG_PRIORITY_INHERITANCE - DEBUGVERIFY(nxsched_getparam (aioc->aioc_pid, ¶m)); + DEBUGVERIFY(nxsched_get_param (aioc->aioc_pid, ¶m)); aioc->aioc_prio = param.sched_priority; #endif diff --git a/fs/inode/fs_filedetach.c b/fs/inode/fs_filedetach.c index 4e6bcaf31ae..227f97bda72 100644 --- a/fs/inode/fs_filedetach.c +++ b/fs/inode/fs_filedetach.c @@ -101,7 +101,7 @@ int file_detach(int fd, FAR struct file *filep) * context. */ - list = sched_getfiles(); + list = nxsched_get_files(); DEBUGASSERT(list != NULL); /* If the file was properly opened, there should be an inode assigned */ diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index 6f74668906e..7c527f7c071 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -188,7 +188,7 @@ int file_dup2(FAR struct file *filep1, FAR struct file *filep2) return -EBADF; } - list = sched_getfiles(); + list = nxsched_get_files(); /* The file list can be NULL under two cases: (1) One is an obscure * cornercase: When memory management debug output is enabled. Then @@ -306,7 +306,7 @@ int files_allocate(FAR struct inode *inode, int oflags, off_t pos, int minfd) /* Get the file descriptor list. It should not be NULL in this context. */ - list = sched_getfiles(); + list = nxsched_get_files(); DEBUGASSERT(list != NULL); ret = _files_semtake(list); @@ -355,7 +355,7 @@ int files_close(int fd) * context. */ - list = sched_getfiles(); + list = nxsched_get_files(); DEBUGASSERT(list != NULL); /* If the file was properly opened, there should be an inode assigned */ @@ -392,7 +392,7 @@ void files_release(int fd) FAR struct filelist *list; int ret; - list = sched_getfiles(); + list = nxsched_get_files(); DEBUGASSERT(list != NULL); if (fd >= 0 && fd < CONFIG_NFILE_DESCRIPTORS) diff --git a/fs/mqueue/mq_close.c b/fs/mqueue/mq_close.c index 38ad44b1785..c42e8765fb0 100644 --- a/fs/mqueue/mq_close.c +++ b/fs/mqueue/mq_close.c @@ -124,7 +124,7 @@ int nxmq_close_group(mqd_t mqdes, FAR struct task_group_s *group) int nxmq_close(mqd_t mqdes) { - FAR struct tcb_s *rtcb = (FAR struct tcb_s *)sched_self(); + FAR struct tcb_s *rtcb = (FAR struct tcb_s *)nxsched_self(); int ret; /* Lock the scheduler to prevent any asynchronous task delete operation @@ -133,7 +133,7 @@ int nxmq_close(mqd_t mqdes) sched_lock(); - rtcb = (FAR struct tcb_s *)sched_self(); + rtcb = (FAR struct tcb_s *)nxsched_self(); DEBUGASSERT(mqdes != NULL && rtcb != NULL && rtcb->group != NULL); /* Then perform the close operation */ diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index 42914685d8a..450f9297607 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -588,7 +588,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, */ #ifndef CONFIG_FS_PROCFS_EXCLUDE_PROCESS - sched_foreach(procfs_enum, level0); + nxsched_foreach(procfs_enum, level0); #else level0->base.index = 0; level0->base.nentries = 0; @@ -841,7 +841,7 @@ static int procfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) pid = level0->pid[index]; - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (!tcb) { ferr("ERROR: PID %d is no longer valid\n", (int)pid); diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 88f4d9c9738..09d5d0d6c72 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -1328,7 +1328,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, pid = (pid_t)tmp; - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb == NULL) { ferr("ERROR: PID %d is no longer valid\n", (int)pid); @@ -1414,7 +1414,7 @@ static ssize_t proc_read(FAR struct file *filep, FAR char *buffer, /* Verify that the thread is still valid */ - tcb = sched_gettcb(procfile->pid); + tcb = nxsched_get_tcb(procfile->pid); if (tcb == NULL) { ferr("ERROR: PID %d is not valid\n", (int)procfile->pid); @@ -1578,7 +1578,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) pid = (pid_t)tmp; - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb == NULL) { ferr("ERROR: PID %d is not valid\n", (int)pid); @@ -1706,7 +1706,7 @@ static int proc_readdir(struct fs_dirent_s *dir) pid = procdir->pid; - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb == NULL) { ferr("ERROR: PID %d is no longer valid\n", (int)pid); @@ -1824,7 +1824,7 @@ static int proc_stat(const char *relpath, struct stat *buf) pid = (pid_t)tmp; - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb == NULL) { ferr("ERROR: PID %d is no longer valid\n", (int)pid); diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c index 25a597e86f7..44842a5810f 100644 --- a/fs/vfs/fs_fdopen.c +++ b/fs/vfs/fs_fdopen.c @@ -147,7 +147,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) if (!tcb) { - tcb = sched_self(); + tcb = nxsched_self(); } DEBUGASSERT(tcb && tcb->group); diff --git a/fs/vfs/fs_getfilep.c b/fs/vfs/fs_getfilep.c index 807d0cf6088..ed6d16b1908 100644 --- a/fs/vfs/fs_getfilep.c +++ b/fs/vfs/fs_getfilep.c @@ -86,7 +86,7 @@ int fs_getfilep(int fd, FAR struct file **filep) * thread-specific file list. */ - list = sched_getfiles(); + list = nxsched_get_files(); /* The file list can be NULL under two cases: (1) One is an obscure * cornercase: When memory management debug output is enabled. Then diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index ef0b2c6ed59..a8a97c39963 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -151,12 +151,12 @@ */ #if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__) -# define _SCHED_GETPARAM(t,p) nxsched_getparam(t,p) -# define _SCHED_SETPARAM(t,p) nxsched_setparam(t,p) -# define _SCHED_GETSCHEDULER(t) nxsched_getscheduler(t) -# define _SCHED_SETSCHEDULER(t,s,p) nxsched_setscheduler(t,s,p) -# define _SCHED_GETAFFINITY(t,c,m) nxsched_getaffinity(t,c,m) -# define _SCHED_SETAFFINITY(t,c,m) nxsched_setaffinity(t,c,m) +# define _SCHED_GETPARAM(t,p) nxsched_get_param(t,p) +# define _SCHED_SETPARAM(t,p) nxsched_set_param(t,p) +# define _SCHED_GETSCHEDULER(t) nxsched_get_scheduler(t) +# define _SCHED_SETSCHEDULER(t,s,p) nxsched_set_scheduler(t,s,p) +# define _SCHED_GETAFFINITY(t,c,m) nxsched_get_affinity(t,c,m) +# define _SCHED_SETAFFINITY(t,c,m) nxsched_set_affinity(t,c,m) # define _SCHED_ERRNO(r) (-(r)) # define _SCHED_ERRVAL(r) (r) #else @@ -790,9 +790,9 @@ struct pthread_tcb_s }; #endif /* !CONFIG_DISABLE_PTHREAD */ -/* This is the callback type used by sched_foreach() */ +/* This is the callback type used by nxsched_foreach() */ -typedef CODE void (*sched_foreach_t)(FAR struct tcb_s *tcb, FAR void *arg); +typedef CODE void (*nxsched_foreach_t)(FAR struct tcb_s *tcb, FAR void *arg); #endif /* __ASSEMBLY__ */ @@ -827,7 +827,7 @@ EXTERN uint32_t g_crit_max[1]; ********************************************************************************/ /******************************************************************************** - * Name: sched_self + * Name: nxsched_self * * Description: * Return the current threads TCB. Basically, this function just wraps the @@ -836,10 +836,10 @@ EXTERN uint32_t g_crit_max[1]; * ********************************************************************************/ -FAR struct tcb_s *sched_self(void); +FAR struct tcb_s *nxsched_self(void); /******************************************************************************** - * Name: sched_foreach + * Name: nxsched_foreach * * Description: * Enumerate over each task and provide the TCB of each task to a user @@ -861,10 +861,10 @@ FAR struct tcb_s *sched_self(void); * ********************************************************************************/ -void sched_foreach(sched_foreach_t handler, FAR void *arg); +void nxsched_foreach(nxsched_foreach_t handler, FAR void *arg); /******************************************************************************** - * Name: sched_gettcb + * Name: nxsched_get_tcb * * Description: * Given a task ID, this function will return the a pointer to the @@ -879,7 +879,7 @@ void sched_foreach(sched_foreach_t handler, FAR void *arg); * ********************************************************************************/ -FAR struct tcb_s *sched_gettcb(pid_t pid); +FAR struct tcb_s *nxsched_get_tcb(pid_t pid); /******************************************************************************** * Name: nxsched_releasepid @@ -890,7 +890,7 @@ FAR struct tcb_s *sched_gettcb(pid_t pid); * ********************************************************************************/ -int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype); +int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t ttype); /* File system helpers **********************************************************/ @@ -898,13 +898,13 @@ int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype); * currently executing task. */ -FAR struct filelist *sched_getfiles(void); +FAR struct filelist *nxsched_get_files(void); #if CONFIG_NFILE_STREAMS > 0 -FAR struct streamlist *sched_getstreams(void); +FAR struct streamlist *nxsched_get_streams(void); #endif /* CONFIG_NFILE_STREAMS */ #ifdef CONFIG_NET -FAR struct socketlist *sched_getsockets(void); +FAR struct socketlist *nxsched_get_sockets(void); #endif /******************************************************************************** @@ -985,7 +985,7 @@ int group_exitinfo(pid_t pid, FAR struct binary_s *bininfo); #endif /******************************************************************************** - * Name: sched_resume_scheduler + * Name: nxsched_resume_scheduler * * Description: * Called by architecture specific implementations that block task execution. @@ -1001,13 +1001,13 @@ int group_exitinfo(pid_t pid, FAR struct binary_s *bininfo); ********************************************************************************/ #if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_RESUMESCHEDULER) -void sched_resume_scheduler(FAR struct tcb_s *tcb); +void nxsched_resume_scheduler(FAR struct tcb_s *tcb); #else -# define sched_resume_scheduler(tcb) +# define nxsched_resume_scheduler(tcb) #endif /******************************************************************************** - * Name: sched_suspend_scheduler + * Name: nxsched_suspend_scheduler * * Description: * Called by architecture specific implementations to resume task execution. @@ -1023,13 +1023,13 @@ void sched_resume_scheduler(FAR struct tcb_s *tcb); ********************************************************************************/ #ifdef CONFIG_SCHED_SUSPENDSCHEDULER -void sched_suspend_scheduler(FAR struct tcb_s *tcb); +void nxsched_suspend_scheduler(FAR struct tcb_s *tcb); #else -# define sched_suspend_scheduler(tcb) +# define nxsched_suspend_scheduler(tcb) #endif /******************************************************************************** - * Name: nxsched_getparam + * Name: nxsched_get_param * * Description: * This function gets the scheduling priority of the task specified by @@ -1057,10 +1057,10 @@ void sched_suspend_scheduler(FAR struct tcb_s *tcb); ********************************************************************************/ struct sched_param; /* Forward reference */ -int nxsched_getparam (pid_t pid, FAR struct sched_param *param); +int nxsched_get_param (pid_t pid, FAR struct sched_param *param); /******************************************************************************** - * Name: nxsched_setparam + * Name: nxsched_set_param * * Description: * This function sets the priority of a specified task. It is identical @@ -1094,10 +1094,10 @@ int nxsched_getparam (pid_t pid, FAR struct sched_param *param); ********************************************************************************/ struct sched_param; /* Forward reference */ -int nxsched_setparam(pid_t pid, FAR const struct sched_param *param); +int nxsched_set_param(pid_t pid, FAR const struct sched_param *param); /******************************************************************************** - * Name: nxsched_getscheduler + * Name: nxsched_get_scheduler * * Description: * sched_getscheduler() returns the scheduling policy currently @@ -1125,18 +1125,18 @@ int nxsched_setparam(pid_t pid, FAR const struct sched_param *param); * ********************************************************************************/ -int nxsched_getscheduler(pid_t pid); +int nxsched_get_scheduler(pid_t pid); /******************************************************************************** - * Name: nxsched_setscheduler + * Name: nxsched_set_scheduler * * Description: - * nxsched_setscheduler() sets both the scheduling policy and the priority + * nxsched_set_scheduler() sets both the scheduling policy and the priority * for the task identified by pid. If pid equals zero, the scheduler of * the calling task will be set. The parameter 'param' holds the priority * of the thread under the new policy. * - * nxsched_setscheduler() is identical to the function sched_getparam(), + * nxsched_set_scheduler() is identical to the function sched_getparam(), * differing only in its return value: This function does not modify the * errno variable. * @@ -1153,7 +1153,7 @@ int nxsched_getscheduler(pid_t pid); * through SCHED_PRIORITY_MAX. * * Returned Value: - * On success, nxsched_setscheduler() returns OK (zero). On error, a + * On success, nxsched_set_scheduler() returns OK (zero). On error, a * negated errno value is returned: * * EINVAL The scheduling policy is not one of the recognized policies. @@ -1161,19 +1161,19 @@ int nxsched_getscheduler(pid_t pid); * ********************************************************************************/ -int nxsched_setscheduler(pid_t pid, int policy, +int nxsched_set_scheduler(pid_t pid, int policy, FAR const struct sched_param *param); /******************************************************************************** - * Name: nxsched_getaffinity + * Name: nxsched_get_affinity * * Description: - * nxsched_getaffinity() writes the affinity mask of the thread whose ID + * nxsched_get_affinity() writes the affinity mask of the thread whose ID * is pid into the cpu_set_t pointed to by mask. The cpusetsize * argument specifies the size (in bytes) of mask. If pid is zero, then * the mask of the calling thread is returned. * - * nxsched_getaffinity() is identical to the function sched_getaffinity(), + * nxsched_get_affinity() is identical to the function sched_getaffinity(), * differing only in its return value: This function does not modify the * errno variable. * @@ -1194,11 +1194,11 @@ int nxsched_setscheduler(pid_t pid, int policy, ********************************************************************************/ #ifdef CONFIG_SMP -int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask); +int nxsched_get_affinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask); #endif /******************************************************************************** - * Name: nxsched_setaffinity + * Name: nxsched_set_affinity * * Description: * sched_setaffinity() sets the CPU affinity mask of the thread whose ID @@ -1211,7 +1211,7 @@ int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask); * CPUs specified in mask, then that thread is migrated to one of the * CPUs specified in mask. * - * nxsched_setaffinity() is identical to the function sched_setparam(), + * nxsched_set_affinity() is identical to the function sched_setparam(), * differing only in its return value: This function does not modify * the errno variable. This is a non-standard, internal OS function and * is not intended for use by application logic. Applications should @@ -1230,12 +1230,12 @@ int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask); ********************************************************************************/ #ifdef CONFIG_SMP -int nxsched_setaffinity(pid_t pid, size_t cpusetsize, +int nxsched_set_affinity(pid_t pid, size_t cpusetsize, FAR const cpu_set_t *mask); #endif /******************************************************************************** - * Name: sched_get_stackinfo + * Name: nxsched_get_stackinfo * * Description: * Report information about a thread's stack allocation. @@ -1254,7 +1254,7 @@ int nxsched_setaffinity(pid_t pid, size_t cpusetsize, * ********************************************************************************/ -int sched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo); +int nxsched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo); /******************************************************************************** * Name: nx_wait/nx_waitid/nx_waitpid diff --git a/include/stdio.h b/include/stdio.h index 4931e77452d..2892b52de30 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -78,9 +78,9 @@ /* The first three _iob entries are reserved for standard I/O */ -#define stdin (&sched_getstreams()->sl_streams[0]) -#define stdout (&sched_getstreams()->sl_streams[1]) -#define stderr (&sched_getstreams()->sl_streams[2]) +#define stdin (&nxsched_get_streams()->sl_streams[0]) +#define stdout (&nxsched_get_streams()->sl_streams[1]) +#define stderr (&nxsched_get_streams()->sl_streams[2]) /* These APIs are not implemented and/or can be synthesized from * supported APIs. diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h index 9d7a827cd28..f0a167e6e85 100644 --- a/include/sys/syscall_lookup.h +++ b/include/sys/syscall_lookup.h @@ -37,7 +37,7 @@ SYSCALL_LOOKUP(sched_setparam, 2) SYSCALL_LOOKUP(sched_setscheduler, 3) SYSCALL_LOOKUP(sched_unlock, 0) SYSCALL_LOOKUP(sched_yield, 0) -SYSCALL_LOOKUP(sched_get_stackinfo, 2) +SYSCALL_LOOKUP(nxsched_get_stackinfo, 2) #ifdef CONFIG_SMP SYSCALL_LOOKUP(sched_getaffinity, 3) @@ -256,7 +256,7 @@ SYSCALL_LOOKUP(telldir, 1) #if CONFIG_NFILE_STREAMS > 0 SYSCALL_LOOKUP(fs_fdopen, 3) - SYSCALL_LOOKUP(sched_getstreams, 0) + SYSCALL_LOOKUP(nxsched_get_streams, 0) #endif #ifdef CONFIG_NET_SENDFILE diff --git a/libs/libc/pthread/pthread_get_stackaddr_np.c b/libs/libc/pthread/pthread_get_stackaddr_np.c index da347c7d52b..faa84c1e5f5 100644 --- a/libs/libc/pthread/pthread_get_stackaddr_np.c +++ b/libs/libc/pthread/pthread_get_stackaddr_np.c @@ -68,7 +68,7 @@ FAR void *pthread_get_stackaddr_np(pthread_t thread) struct stackinfo_s stackinfo; int ret; - ret = sched_get_stackinfo((pid_t)thread, &stackinfo); + ret = nxsched_get_stackinfo((pid_t)thread, &stackinfo); if (ret < 0) { return NULL; diff --git a/libs/libc/pthread/pthread_get_stacksize_np.c b/libs/libc/pthread/pthread_get_stacksize_np.c index 6fe86f49e11..936959255cf 100644 --- a/libs/libc/pthread/pthread_get_stacksize_np.c +++ b/libs/libc/pthread/pthread_get_stacksize_np.c @@ -70,7 +70,7 @@ ssize_t pthread_get_stacksize_np(pthread_t thread) struct stackinfo_s stackinfo; int ret; - ret = sched_get_stackinfo((pid_t)thread, &stackinfo); + ret = nxsched_get_stackinfo((pid_t)thread, &stackinfo); if (ret < 0) { return (ssize_t)ret; diff --git a/libs/libc/stdio/lib_fflush.c b/libs/libc/stdio/lib_fflush.c index 0cef2ca7de1..89b86467976 100644 --- a/libs/libc/stdio/lib_fflush.c +++ b/libs/libc/stdio/lib_fflush.c @@ -77,7 +77,7 @@ int fflush(FAR FILE *stream) { /* Yes... then this is a request to flush all streams */ - ret = lib_flushall(sched_getstreams()); + ret = lib_flushall(nxsched_get_streams()); } else { diff --git a/libs/libc/tls/tls_getinfo.c b/libs/libc/tls/tls_getinfo.c index ee00bebd1ad..fec3eb00d23 100644 --- a/libs/libc/tls/tls_getinfo.c +++ b/libs/libc/tls/tls_getinfo.c @@ -60,7 +60,7 @@ FAR struct tls_info_s *tls_get_info(void) struct stackinfo_s stackinfo; int ret; - ret = sched_get_stackinfo(0, &stackinfo); + ret = nxsched_get_stackinfo(0, &stackinfo); if (ret >= 0) { /* This currently assumes a push-down stack. The TLS data lies at the diff --git a/mm/shm/shmat.c b/mm/shm/shmat.c index 2733da96f26..29c2680bf2e 100644 --- a/mm/shm/shmat.c +++ b/mm/shm/shmat.c @@ -125,7 +125,7 @@ FAR void *shmat(int shmid, FAR const void *shmaddr, int shmflg) /* Get the TCB and group containing our virtual memory allocator */ - tcb = sched_self(); + tcb = nxsched_self(); DEBUGASSERT(tcb && tcb->group); group = tcb->group; DEBUGASSERT(group->tg_shm.gs_handle != NULL && diff --git a/mm/shm/shmdt.c b/mm/shm/shmdt.c index 979315c7971..5a6b74592c2 100644 --- a/mm/shm/shmdt.c +++ b/mm/shm/shmdt.c @@ -90,7 +90,7 @@ int shmdt(FAR const void *shmaddr) /* Get the TCB and group containing our virtual memory allocator */ - tcb = sched_self(); + tcb = nxsched_self(); DEBUGASSERT(tcb && tcb->group); group = tcb->group; DEBUGASSERT(group->tg_shm.gs_handle != NULL); diff --git a/net/socket/net_sockets.c b/net/socket/net_sockets.c index 233d48e2b70..0f78f297321 100644 --- a/net/socket/net_sockets.c +++ b/net/socket/net_sockets.c @@ -145,7 +145,7 @@ int sockfd_allocate(int minsd) /* Get the socket list for this task/thread */ - list = sched_getsockets(); + list = nxsched_get_sockets(); if (list) { /* Search for a socket structure with no references */ @@ -235,7 +235,7 @@ void sockfd_release(int sockfd) * to this socket structure. */ - FAR struct socketlist *list = sched_getsockets(); + FAR struct socketlist *list = nxsched_get_sockets(); if (list) { _net_semtake(list); @@ -267,7 +267,7 @@ FAR struct socket *sockfd_socket(int sockfd) if (ndx >= 0 && ndx < CONFIG_NSOCKET_DESCRIPTORS) { - list = sched_getsockets(); + list = nxsched_get_sockets(); if (list) { return &list->sl_sockets[ndx]; diff --git a/sched/group/group_continue.c b/sched/group/group_continue.c index e6304e636a2..fdbcb47ac47 100644 --- a/sched/group/group_continue.c +++ b/sched/group/group_continue.c @@ -76,7 +76,7 @@ static int group_continue_handler(pid_t pid, FAR void *arg) /* Resume all threads */ - rtcb = sched_gettcb(pid); + rtcb = nxsched_get_tcb(pid); if (rtcb != NULL) { sched_continue(rtcb); diff --git a/sched/group/group_exitinfo.c b/sched/group/group_exitinfo.c index 6a7529e7338..885833d8483 100644 --- a/sched/group/group_exitinfo.c +++ b/sched/group/group_exitinfo.c @@ -86,7 +86,7 @@ int group_exitinfo(pid_t pid, FAR struct binary_s *bininfo) /* Get the TCB associated with the PID */ - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb == NULL) { spin_unlock_irqrestore(flags); diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c index 19033ccaad3..5cec88a84e5 100644 --- a/sched/group/group_killchildren.c +++ b/sched/group/group_killchildren.c @@ -85,7 +85,7 @@ static int group_killchildren_handler(pid_t pid, FAR void *arg) * to do. */ - rtcb = sched_gettcb(pid); + rtcb = nxsched_get_tcb(pid); if (rtcb != NULL) { /* This is a forced cancellation. Make sure that cancellation is diff --git a/sched/group/group_signal.c b/sched/group/group_signal.c index a2198552bc3..0d38698bdc6 100644 --- a/sched/group/group_signal.c +++ b/sched/group/group_signal.c @@ -95,7 +95,7 @@ static int group_signal_handler(pid_t pid, FAR void *arg) /* Get the TCB associated with the group member */ - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); DEBUGASSERT(tcb != NULL && tcb->group != NULL && info != NULL); if (tcb) diff --git a/sched/group/group_suspendchildren.c b/sched/group/group_suspendchildren.c index 131ff72be6e..1c71fc4be35 100644 --- a/sched/group/group_suspendchildren.c +++ b/sched/group/group_suspendchildren.c @@ -80,7 +80,7 @@ static int group_suspendchildren_handler(pid_t pid, FAR void *arg) { /* Suspend this thread if it is still alive. */ - rtcb = sched_gettcb(pid); + rtcb = nxsched_get_tcb(pid); if (rtcb != NULL) { sched_suspend(rtcb); diff --git a/sched/mqueue/mq_descreate.c b/sched/mqueue/mq_descreate.c index ccab4799bb1..760fa8a4e64 100644 --- a/sched/mqueue/mq_descreate.c +++ b/sched/mqueue/mq_descreate.c @@ -115,7 +115,7 @@ mqd_t nxmq_create_des(FAR struct tcb_s *mtcb, if (!mtcb) { - mtcb = sched_self(); + mtcb = nxsched_self(); } group = mtcb->group; diff --git a/sched/mqueue/mq_timedreceive.c b/sched/mqueue/mq_timedreceive.c index a7dbcf5d9e9..3c9bf99d8bd 100644 --- a/sched/mqueue/mq_timedreceive.c +++ b/sched/mqueue/mq_timedreceive.c @@ -79,7 +79,7 @@ static void nxmq_rcvtimeout(int argc, wdparm_t pid, ...) * longer be active when this watchdog goes off. */ - wtcb = sched_gettcb((pid_t)pid); + wtcb = nxsched_get_tcb((pid_t)pid); /* It is also possible that an interrupt/context switch beat us to the * punch and already changed the task's state. diff --git a/sched/mqueue/mq_timedsend.c b/sched/mqueue/mq_timedsend.c index 821a066b765..b9fa37c9520 100644 --- a/sched/mqueue/mq_timedsend.c +++ b/sched/mqueue/mq_timedsend.c @@ -78,7 +78,7 @@ static void nxmq_sndtimeout(int argc, wdparm_t pid, ...) * longer be active when this watchdog goes off. */ - wtcb = sched_gettcb((pid_t)pid); + wtcb = nxsched_get_tcb((pid_t)pid); /* It is also possible that an interrupt/context switch beat us to the * punch and already changed the task's state. diff --git a/sched/paging/pg_miss.c b/sched/paging/pg_miss.c index 2713fe987c8..380014b2623 100644 --- a/sched/paging/pg_miss.c +++ b/sched/paging/pg_miss.c @@ -157,7 +157,7 @@ void pg_miss(void) * of the page fill worker thread to that priority. */ - wtcb = sched_gettcb(g_pgworker); + wtcb = nxsched_get_tcb(g_pgworker); DEBUGASSERT(wtcb != NULL); if (wtcb->sched_priority < ftcb->sched_priority) diff --git a/sched/paging/pg_worker.c b/sched/paging/pg_worker.c index a73a36b9950..49dcedcbd52 100644 --- a/sched/paging/pg_worker.c +++ b/sched/paging/pg_worker.c @@ -153,7 +153,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) if (g_pftcb) { FAR struct tcb_s *htcb = (FAR struct tcb_s *)g_waitingforfill.head; - FAR struct tcb_s *wtcb = sched_gettcb(g_pgworker); + FAR struct tcb_s *wtcb = nxsched_get_tcb(g_pgworker); /* Find the higher priority between the task waiting for the fill to * complete in g_pftcb and the task waiting at the head of the diff --git a/sched/pthread/pthread_cancel.c b/sched/pthread/pthread_cancel.c index 92b400231d6..4798cdaedb7 100644 --- a/sched/pthread/pthread_cancel.c +++ b/sched/pthread/pthread_cancel.c @@ -67,7 +67,7 @@ int pthread_cancel(pthread_t thread) return ESRCH; } - tcb = (FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread); + tcb = (FAR struct pthread_tcb_s *)nxsched_get_tcb((pid_t)thread); if (tcb == NULL) { /* The pid does not correspond to any known thread. The thread diff --git a/sched/pthread/pthread_condtimedwait.c b/sched/pthread/pthread_condtimedwait.c index e0c224648a3..2613606c84b 100644 --- a/sched/pthread/pthread_condtimedwait.c +++ b/sched/pthread/pthread_condtimedwait.c @@ -92,11 +92,11 @@ static void pthread_condtimedout(int argc, wdparm_t arg1, ...) * the signal. */ - /* Get the waiting TCB. sched_gettcb() might return NULL if the task + /* Get the waiting TCB. nxsched_get_tcb() might return NULL if the task * has exited for some reason. */ - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (tcb) { /* Create the siginfo structure */ diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 4d825b7fd42..df3715a559f 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -332,7 +332,7 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, * thread. */ - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { errcode = -ret; @@ -341,7 +341,7 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, /* Get the scheduler policy for this thread */ - policy = nxsched_getscheduler(0); + policy = nxsched_get_scheduler(0); if (policy < 0) { errcode = -policy; @@ -621,6 +621,6 @@ errout_with_tcb: ptcb->cmn.group = NULL; } - sched_releasetcb((FAR struct tcb_s *)ptcb, TCB_FLAG_TTYPE_PTHREAD); + nxsched_release_tcb((FAR struct tcb_s *)ptcb, TCB_FLAG_TTYPE_PTHREAD); return errcode; } diff --git a/sched/pthread/pthread_getaffinity.c b/sched/pthread/pthread_getaffinity.c index 90a1720c6d2..31ebd983eb9 100644 --- a/sched/pthread/pthread_getaffinity.c +++ b/sched/pthread/pthread_getaffinity.c @@ -88,12 +88,12 @@ int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); - /* Let nxsched_getaffinity do all of the work */ + /* Let nxsched_get_affinity do all of the work */ - ret = nxsched_getaffinity((pid_t)thread, cpusetsize, cpuset); + ret = nxsched_get_affinity((pid_t)thread, cpusetsize, cpuset); if (ret < 0) { - /* If nxsched_getaffinity() fails, return the positive errno */ + /* If nxsched_get_affinity() fails, return the positive errno */ ret = -ret; } diff --git a/sched/pthread/pthread_getschedparam.c b/sched/pthread/pthread_getschedparam.c index 0fc7dd7a05d..142c72bf1ab 100644 --- a/sched/pthread/pthread_getschedparam.c +++ b/sched/pthread/pthread_getschedparam.c @@ -103,7 +103,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy, { /* Get the scheduler parameters of the thread. */ - ret = nxsched_getparam((pid_t)thread, param); + ret = nxsched_get_param((pid_t)thread, param); if (ret < 0) { ret = -ret; @@ -112,7 +112,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy, { /* Get the scheduler policy. */ - ret = nxsched_getscheduler((pid_t)thread); + ret = nxsched_get_scheduler((pid_t)thread); if (ret < 0) { ret = -ret; diff --git a/sched/pthread/pthread_join.c b/sched/pthread/pthread_join.c index a7ad480087b..39c8182f540 100644 --- a/sched/pthread/pthread_join.c +++ b/sched/pthread/pthread_join.c @@ -128,7 +128,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) { /* Determine what kind of error to return */ - FAR struct tcb_s *tcb = sched_gettcb((pthread_t)thread); + FAR struct tcb_s *tcb = nxsched_get_tcb((pthread_t)thread); swarn("WARNING: Could not find thread data\n"); diff --git a/sched/pthread/pthread_kill.c b/sched/pthread/pthread_kill.c index 996db701cd3..96fa50ff858 100644 --- a/sched/pthread/pthread_kill.c +++ b/sched/pthread/pthread_kill.c @@ -125,7 +125,7 @@ int pthread_kill(pthread_t thread, int signo) /* Get the TCB associated with the thread */ - stcb = sched_gettcb((pid_t)thread); + stcb = nxsched_get_tcb((pid_t)thread); if (!stcb) { ret = -ESRCH; diff --git a/sched/pthread/pthread_mutexconsistent.c b/sched/pthread/pthread_mutexconsistent.c index d4b2b246a9c..e48f19c59d7 100644 --- a/sched/pthread/pthread_mutexconsistent.c +++ b/sched/pthread/pthread_mutexconsistent.c @@ -111,11 +111,11 @@ int pthread_mutex_consistent(FAR pthread_mutex_t *mutex) * (see pthread_mutex_consistent()). * * If the holding thread is still valid, then we should be able to - * map its PID to the underlying TCB. That is what sched_gettcb() + * map its PID to the underlying TCB. That is what nxsched_get_tcb() * does. */ - if (sched_gettcb(mutex->pid) == NULL) + if (nxsched_get_tcb(mutex->pid) == NULL) { /* The thread associated with the PID no longer exists */ diff --git a/sched/pthread/pthread_mutexdestroy.c b/sched/pthread/pthread_mutexdestroy.c index bbf21f2e35d..578cc79a90c 100644 --- a/sched/pthread/pthread_mutexdestroy.c +++ b/sched/pthread/pthread_mutexdestroy.c @@ -96,11 +96,11 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) * (see pthread_mutex_consistent()). * * If the holding thread is still valid, then we should be able to - * map its PID to the underlying TCB. That is what sched_gettcb() + * map its PID to the underlying TCB. That is what nxsched_get_tcb() * does. */ - if (sched_gettcb(mutex->pid) == NULL) + if (nxsched_get_tcb(mutex->pid) == NULL) { /* The thread associated with the PID no longer exists */ diff --git a/sched/pthread/pthread_mutextimedlock.c b/sched/pthread/pthread_mutextimedlock.c index be6f9df8149..acd8ace761c 100644 --- a/sched/pthread/pthread_mutextimedlock.c +++ b/sched/pthread/pthread_mutextimedlock.c @@ -165,20 +165,20 @@ int pthread_mutex_timedlock(FAR pthread_mutex_t *mutex, if (mutex->pid > 0 && ((mutex->flags & _PTHREAD_MFLAGS_ROBUST) != 0 || mutex->type != PTHREAD_MUTEX_NORMAL) && - sched_gettcb(mutex->pid) == NULL) + nxsched_get_tcb(mutex->pid) == NULL) #else /* CONFIG_PTHREAD_MUTEX_TYPES */ /* This can only be a NORMAL mutex. Include check if it is robust */ if (mutex->pid > 0 && (mutex->flags & _PTHREAD_MFLAGS_ROBUST) != 0 && - sched_gettcb(mutex->pid) == NULL) + nxsched_get_tcb(mutex->pid) == NULL) #endif /* CONFIG_PTHREAD_MUTEX_TYPES */ #else /* CONFIG_PTHREAD_MUTEX_ROBUST */ /* This mutex is always robust, whatever type it is. */ - if (mutex->pid > 0 && sched_gettcb(mutex->pid) == NULL) + if (mutex->pid > 0 && nxsched_get_tcb(mutex->pid) == NULL) #endif { DEBUGASSERT(mutex->pid != 0); /* < 0: available, >0 owned, ==0 error */ diff --git a/sched/pthread/pthread_mutextrylock.c b/sched/pthread/pthread_mutextrylock.c index 07441e743d2..bda07dd3ffc 100644 --- a/sched/pthread/pthread_mutextrylock.c +++ b/sched/pthread/pthread_mutextrylock.c @@ -160,20 +160,20 @@ int pthread_mutex_trylock(FAR pthread_mutex_t *mutex) if (mutex->pid > 0 && ((mutex->flags & _PTHREAD_MFLAGS_ROBUST) != 0 || mutex->type != PTHREAD_MUTEX_NORMAL) && - sched_gettcb(mutex->pid) == NULL) + nxsched_get_tcb(mutex->pid) == NULL) #else /* CONFIG_PTHREAD_MUTEX_TYPES */ /* Check if this NORMAL mutex is robust */ if (mutex->pid > 0 && (mutex->flags & _PTHREAD_MFLAGS_ROBUST) != 0 && - sched_gettcb(mutex->pid) == NULL) + nxsched_get_tcb(mutex->pid) == NULL) #endif /* CONFIG_PTHREAD_MUTEX_TYPES */ #else /* CONFIG_PTHREAD_MUTEX_ROBUST */ /* This mutex is always robust, whatever type it is. */ - if (mutex->pid > 0 && sched_gettcb(mutex->pid) == NULL) + if (mutex->pid > 0 && nxsched_get_tcb(mutex->pid) == NULL) #endif { DEBUGASSERT(mutex->pid != 0); /* < 0: available, >0 owned, ==0 error */ diff --git a/sched/pthread/pthread_setaffinity.c b/sched/pthread/pthread_setaffinity.c index 92f0a419d70..b13aa947b4d 100644 --- a/sched/pthread/pthread_setaffinity.c +++ b/sched/pthread/pthread_setaffinity.c @@ -90,9 +90,9 @@ int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); - /* Let nxsched_setaffinity do all of the work, adjusting the return value */ + /* Let nxsched_set_affinity do all of the work, adjusting the return value */ - ret = nxsched_setaffinity((pid_t)thread, cpusetsize, cpuset); + ret = nxsched_set_affinity((pid_t)thread, cpusetsize, cpuset); return ret < 0 ? -ret : OK; } diff --git a/sched/pthread/pthread_setschedparam.c b/sched/pthread/pthread_setschedparam.c index 4b8f3f6860d..502b3aa757d 100644 --- a/sched/pthread/pthread_setschedparam.c +++ b/sched/pthread/pthread_setschedparam.c @@ -108,12 +108,12 @@ int pthread_setschedparam(pthread_t thread, int policy, sinfo("thread ID=%d policy=%d param=0x%p\n", thread, policy, param); - /* Let nxsched_setscheduler do all of the work */ + /* Let nxsched_set_scheduler do all of the work */ - ret = nxsched_setscheduler((pid_t)thread, policy, param); + ret = nxsched_set_scheduler((pid_t)thread, policy, param); if (ret < 0) { - /* If nxsched_setscheduler() fails, return the positive errno value */ + /* If nxsched_set_scheduler() fails, return the positive errno value */ ret = -ret; } diff --git a/sched/pthread/pthread_setschedprio.c b/sched/pthread/pthread_setschedprio.c index aed67e45593..494e6fbbd98 100644 --- a/sched/pthread/pthread_setschedprio.c +++ b/sched/pthread/pthread_setschedprio.c @@ -87,17 +87,17 @@ int pthread_setschedprio(pthread_t thread, int prio) * modified. */ - ret = nxsched_getparam((pid_t)thread, ¶m); + ret = nxsched_get_param((pid_t)thread, ¶m); if (ret < 0) { return -ret; } #endif - /* Call nxsched_setparam() to change the priority */ + /* Call nxsched_set_param() to change the priority */ param.sched_priority = prio; - ret = nxsched_setparam((pid_t)thread, ¶m); + ret = nxsched_set_param((pid_t)thread, ¶m); if (ret < 0) { return -ret; diff --git a/sched/sched/sched.h b/sched/sched/sched.h index e56c835cc93..a1dfe70a525 100644 --- a/sched/sched/sched.h +++ b/sched/sched/sched.h @@ -115,7 +115,7 @@ * NOTE also that CPU load measurement data is retained in his table vs. in * the TCB which would seem to be the more logic place. It is place in the * hash table, instead, to facilitate CPU load adjustments on all threads - * during timer interrupt handling. sched_foreach() could do this too, but + * during timer interrupt handling. nxsched_foreach() could do this too, but * this would require a little more overhead. */ diff --git a/sched/sched/sched_cpuload.c b/sched/sched/sched_cpuload.c index c82944ce5de..23df69f3996 100644 --- a/sched/sched/sched_cpuload.c +++ b/sched/sched/sched_cpuload.c @@ -133,7 +133,7 @@ static inline void nxsched_cpu_process_cpuload(int cpu) * NOTE also that CPU load measurement data is retained in the g_pidhash * table vs. in the TCB which would seem to be the more logic place. It * is place in the hash table, instead, to facilitate CPU load adjustments - * on all threads during timer interrupt handling. sched_foreach() could + * on all threads during timer interrupt handling. nxsched_foreach() could * do this too, but this would require a little more overhead. */ @@ -266,7 +266,7 @@ int clock_cpuload(int pid, FAR struct cpuload_s *cpuload) * NOTE also that CPU load measurement data is retained in the g_pidhash * table vs. in the TCB which would seem to be the more logic place. It * is place in the hash table, instead, to facilitate CPU load adjustments - * on all threads during timer interrupt handling. sched_foreach() could + * on all threads during timer interrupt handling. nxsched_foreach() could * do this too, but this would require a little more overhead. */ diff --git a/sched/sched/sched_foreach.c b/sched/sched/sched_foreach.c index 24ae872bb9b..2f02043d957 100644 --- a/sched/sched/sched_foreach.c +++ b/sched/sched/sched_foreach.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_foreach.c + * sched/sched/nxsched_foreach.c * * Copyright (C) 2007, 2009, 2016, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,7 +48,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_foreach + * Name: nxsched_foreach * * Description: * Enumerate over each task and provide the TCB of each task to a user @@ -70,7 +70,7 @@ * ****************************************************************************/ -void sched_foreach(sched_foreach_t handler, FAR void *arg) +void nxsched_foreach(nxsched_foreach_t handler, FAR void *arg) { irqstate_t flags; int ndx; diff --git a/sched/sched/sched_get_stackinfo.c b/sched/sched/sched_get_stackinfo.c index 2ce750268db..8b7af5f1fde 100644 --- a/sched/sched/sched_get_stackinfo.c +++ b/sched/sched/sched_get_stackinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_get_stackinfo.c + * sched/sched/nxsched_get_stackinfo.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_get_stackinfo + * Name: nxsched_get_stackinfo * * Description: * Report information about a thread's stack allocation. @@ -54,7 +54,7 @@ * ****************************************************************************/ -int sched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo) +int nxsched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo) { FAR struct tcb_s *rtcb = this_task(); /* TCB of running task */ FAR struct tcb_s *qtcb; /* TCB of queried task */ @@ -73,7 +73,7 @@ int sched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo) { /* Get the task to be queried */ - qtcb = sched_gettcb(pid); + qtcb = nxsched_get_tcb(pid); if (qtcb == NULL) { return -ENOENT; diff --git a/sched/sched/sched_getaffinity.c b/sched/sched/sched_getaffinity.c index 7a15bc7d578..3c1c2c13fec 100644 --- a/sched/sched/sched_getaffinity.c +++ b/sched/sched/sched_getaffinity.c @@ -53,15 +53,15 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_getaffinity + * Name: nxsched_get_affinity * * Description: - * nxsched_getaffinity() writes the affinity mask of the thread whose ID + * nxsched_get_affinity() writes the affinity mask of the thread whose ID * is pid into the cpu_set_t pointed to by mask. The cpusetsize * argument specifies the size (in bytes) of mask. If pid is zero, then * the mask of the calling thread is returned. * - * nxsched_getaffinity() is identical to the function sched_getaffinity(), + * nxsched_get_affinity() is identical to the function sched_getaffinity(), * differing only in its return value: This function does not modify the * errno variable. * @@ -81,7 +81,7 @@ * ****************************************************************************/ -int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) +int nxsched_get_affinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) { FAR struct tcb_s *tcb; int ret; @@ -97,7 +97,7 @@ int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) } else { - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); } if (tcb == NULL) @@ -125,7 +125,7 @@ int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) * argument specifies the size (in bytes) of mask. If pid is zero, then * the mask of the calling thread is returned. * - * This function is a simply wrapper around nxsched_getaffinity() that + * This function is a simply wrapper around nxsched_get_affinity() that * sets the errno value in the event of an error. * * Input Parameters: @@ -143,7 +143,7 @@ int nxsched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) int sched_getaffinity(pid_t pid, size_t cpusetsize, FAR cpu_set_t *mask) { - int ret = nxsched_getaffinity(pid, cpusetsize, mask); + int ret = nxsched_get_affinity(pid, cpusetsize, mask); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_getfiles.c b/sched/sched/sched_getfiles.c index 5504ea6f0d0..5d8e47e314d 100644 --- a/sched/sched/sched_getfiles.c +++ b/sched/sched/sched_getfiles.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_getfiles.c + * sched/sched/nxsched_get_files.c * * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_getfiles + * Name: nxsched_get_files * * Description: * Return a pointer to the file list for this thread @@ -65,7 +65,7 @@ * ****************************************************************************/ -FAR struct filelist *sched_getfiles(void) +FAR struct filelist *nxsched_get_files(void) { FAR struct tcb_s *rtcb = this_task(); FAR struct task_group_s *group = rtcb->group; diff --git a/sched/sched/sched_getparam.c b/sched/sched/sched_getparam.c index 87ec3b4143e..ad49a959d84 100644 --- a/sched/sched/sched_getparam.c +++ b/sched/sched/sched_getparam.c @@ -53,7 +53,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_getparam + * Name: nxsched_get_param * * Description: * This function gets the scheduling priority of the task specified by @@ -80,7 +80,7 @@ * ****************************************************************************/ -int nxsched_getparam(pid_t pid, FAR struct sched_param *param) +int nxsched_get_param(pid_t pid, FAR struct sched_param *param) { FAR struct tcb_s *rtcb; FAR struct tcb_s *tcb; @@ -108,7 +108,7 @@ int nxsched_getparam(pid_t pid, FAR struct sched_param *param) /* Get the TCB associated with this PID */ sched_lock(); - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (!tcb) { /* This PID does not correspond to any known task */ @@ -162,7 +162,7 @@ int nxsched_getparam(pid_t pid, FAR struct sched_param *param) * * Description: * This function gets the scheduling priority of the task specified by - * pid. This function is a simply wrapper around nxsched_getparam() that + * pid. This function is a simply wrapper around nxsched_get_param() that * sets the errno value in the event of an error. * * Input Parameters: @@ -183,7 +183,7 @@ int nxsched_getparam(pid_t pid, FAR struct sched_param *param) int sched_getparam(pid_t pid, FAR struct sched_param *param) { - int ret = nxsched_getparam(pid, param); + int ret = nxsched_get_param(pid, param); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_getscheduler.c b/sched/sched/sched_getscheduler.c index 13150854ba7..1cdbbafe73d 100644 --- a/sched/sched/sched_getscheduler.c +++ b/sched/sched/sched_getscheduler.c @@ -53,7 +53,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_getscheduler + * Name: nxsched_get_scheduler * * Description: * sched_getscheduler() returns the scheduling policy currently @@ -81,7 +81,7 @@ * ****************************************************************************/ -int nxsched_getscheduler(pid_t pid) +int nxsched_get_scheduler(pid_t pid) { FAR struct tcb_s *tcb; int policy; @@ -94,7 +94,7 @@ int nxsched_getscheduler(pid_t pid) } else { - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); } if (tcb == NULL) @@ -118,7 +118,7 @@ int nxsched_getscheduler(pid_t pid) * applied to the task identified by pid. If pid equals zero, the * policy of the calling task will be retrieved. * - * sched_getscheduler() is a simply wrapper around nxsched_getscheduler() + * sched_getscheduler() is a simply wrapper around nxsched_get_scheduler() * that sets the errno value in the event of an error. * * Input Parameters: @@ -136,7 +136,7 @@ int nxsched_getscheduler(pid_t pid) int sched_getscheduler(pid_t pid) { - int ret = nxsched_getscheduler(pid); + int ret = nxsched_get_scheduler(pid); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_getsockets.c b/sched/sched/sched_getsockets.c index 2ccf895f851..f40e45d3f8d 100644 --- a/sched/sched/sched_getsockets.c +++ b/sched/sched/sched_getsockets.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_getsockets.c + * sched/sched/nxsched_get_sockets.c * * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,7 +47,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_getsockets + * Name: nxsched_get_sockets * * Description: * Return a pointer to the socket list for this thread @@ -63,7 +63,7 @@ ****************************************************************************/ #ifdef CONFIG_NET -FAR struct socketlist *sched_getsockets(void) +FAR struct socketlist *nxsched_get_sockets(void) { FAR struct tcb_s *rtcb = this_task(); FAR struct task_group_s *group = rtcb->group; diff --git a/sched/sched/sched_getstreams.c b/sched/sched/sched_getstreams.c index 958eb9b2573..98e267888f9 100644 --- a/sched/sched/sched_getstreams.c +++ b/sched/sched/sched_getstreams.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_getstreams.c + * sched/sched/nxsched_get_streams.c * * Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,7 +46,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_getstreams + * Name: nxsched_get_streams * * Description: * Return a pointer to the streams list for this thread @@ -63,7 +63,7 @@ #if CONFIG_NFILE_STREAMS > 0 -FAR struct streamlist *sched_getstreams(void) +FAR struct streamlist *nxsched_get_streams(void) { FAR struct tcb_s *rtcb = this_task(); FAR struct task_group_s *group = rtcb->group; diff --git a/sched/sched/sched_gettcb.c b/sched/sched/sched_gettcb.c index 6147db93da3..c7a57295c21 100644 --- a/sched/sched/sched_gettcb.c +++ b/sched/sched/sched_gettcb.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_gettcb.c + * sched/sched/nxsched_get_tcb.c * * Copyright (C) 2007, 2009, 2011, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_gettcb + * Name: nxsched_get_tcb * * Description: * Given a task ID, this function will return the a pointer to the @@ -65,7 +65,7 @@ * ****************************************************************************/ -FAR struct tcb_s *sched_gettcb(pid_t pid) +FAR struct tcb_s *nxsched_get_tcb(pid_t pid) { FAR struct tcb_s *ret = NULL; irqstate_t flags; diff --git a/sched/sched/sched_releasetcb.c b/sched/sched/sched_releasetcb.c index 7f7f04a7fad..0764e859789 100644 --- a/sched/sched/sched_releasetcb.c +++ b/sched/sched/sched_releasetcb.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_releasetcb.c + * sched/sched/nxsched_release_tcb.c * * Copyright (C) 2007, 2009, 2012-2014, 2019 Gregory Nutt. All rights * reserved. @@ -90,7 +90,7 @@ static void nxsched_releasepid(pid_t pid) ****************************************************************************/ /**************************************************************************** - * Name: sched_releasetcb + * Name: nxsched_release_tcb * * Description: * Free all resources contained in a TCB @@ -101,7 +101,7 @@ static void nxsched_releasepid(pid_t pid) * * This thread type is normally available in the flags field of the TCB, * however, there are certain error recovery contexts where the TCB my - * not be fully initialized when sched_releasetcb is called. + * not be fully initialized when nxsched_release_tcb is called. * * Returned Value: * OK on success; ERROR on failure @@ -111,7 +111,7 @@ static void nxsched_releasepid(pid_t pid) * ****************************************************************************/ -int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype) +int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t ttype) { int ret = OK; diff --git a/sched/sched/sched_resumescheduler.c b/sched/sched/sched_resumescheduler.c index caad9950250..4802fe58792 100644 --- a/sched/sched/sched_resumescheduler.c +++ b/sched/sched/sched_resumescheduler.c @@ -55,7 +55,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_resume_scheduler + * Name: nxsched_resume_scheduler * * Description: * Called by architecture specific implementations that block task @@ -70,7 +70,7 @@ * ****************************************************************************/ -void sched_resume_scheduler(FAR struct tcb_s *tcb) +void nxsched_resume_scheduler(FAR struct tcb_s *tcb) { #if CONFIG_RR_INTERVAL > 0 #ifdef CONFIG_SCHED_SPORADIC diff --git a/sched/sched/sched_rrgetinterval.c b/sched/sched/sched_rrgetinterval.c index 89d67d76a2d..ea7f8f90fef 100644 --- a/sched/sched/sched_rrgetinterval.c +++ b/sched/sched/sched_rrgetinterval.c @@ -105,7 +105,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval) else { - rrtcb = sched_gettcb(pid); + rrtcb = nxsched_get_tcb(pid); if (rrtcb == NULL) { set_errno(ESRCH); diff --git a/sched/sched/sched_self.c b/sched/sched/sched_self.c index 97ba42d6045..06c52abcd16 100644 --- a/sched/sched/sched_self.c +++ b/sched/sched/sched_self.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/sched/sched_self.c + * sched/sched/nxsched_self.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,7 +46,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_self + * Name: nxsched_self * * Description: * Return the current threads TCB. Basically, this function just wraps the @@ -55,7 +55,7 @@ * ****************************************************************************/ -FAR struct tcb_s *sched_self(void) +FAR struct tcb_s *nxsched_self(void) { return this_task(); } diff --git a/sched/sched/sched_setaffinity.c b/sched/sched/sched_setaffinity.c index 0926bfbe8d8..69ec42e6022 100644 --- a/sched/sched/sched_setaffinity.c +++ b/sched/sched/sched_setaffinity.c @@ -53,7 +53,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_setaffinity + * Name: nxsched_set_affinity * * Description: * sched_setaffinity() sets the CPU affinity mask of the thread whose ID @@ -66,7 +66,7 @@ * CPUs specified in mask, then that thread is migrated to one of the * CPUs specified in mask. * - * nxsched_setaffinity() is identical to the function sched_setparam(), + * nxsched_set_affinity() is identical to the function sched_setparam(), * differing only in its return value: This function does not modify * the errno variable. This is a non-standard, internal OS function and * is not intended for use by application logic. Applications should @@ -84,7 +84,7 @@ * ****************************************************************************/ -int nxsched_setaffinity(pid_t pid, size_t cpusetsize, +int nxsched_set_affinity(pid_t pid, size_t cpusetsize, FAR const cpu_set_t *mask) { FAR struct tcb_s *tcb; @@ -102,7 +102,7 @@ int nxsched_setaffinity(pid_t pid, size_t cpusetsize, } else { - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); } if (tcb == NULL) @@ -177,7 +177,7 @@ errout_with_lock: * CPUs specified in mask, then that thread is migrated to one of the * CPUs specified in mask. * - * This function is a simply wrapper around nxsched_setaffinity() that sets + * This function is a simply wrapper around nxsched_set_affinity() that sets * the errno value in the event of an error. * * Input Parameters: @@ -196,7 +196,7 @@ errout_with_lock: int sched_setaffinity(pid_t pid, size_t cpusetsize, FAR const cpu_set_t *mask) { - int ret = nxsched_setaffinity(pid, cpusetsize, mask); + int ret = nxsched_set_affinity(pid, cpusetsize, mask); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_setparam.c b/sched/sched/sched_setparam.c index 17eb36d0d9c..d3bfe7ab31d 100644 --- a/sched/sched/sched_setparam.c +++ b/sched/sched/sched_setparam.c @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_setparam + * Name: nxsched_set_param * * Description: * This function sets the priority of a specified task. It is identical @@ -90,7 +90,7 @@ * ****************************************************************************/ -int nxsched_setparam(pid_t pid, FAR const struct sched_param *param) +int nxsched_set_param(pid_t pid, FAR const struct sched_param *param) { FAR struct tcb_s *rtcb; FAR struct tcb_s *tcb; @@ -121,7 +121,7 @@ int nxsched_setparam(pid_t pid, FAR const struct sched_param *param) else { - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (!tcb) { /* No task with this PID was found */ @@ -233,7 +233,7 @@ errout_with_lock: * * Description: * This function sets the priority of a specified task. This function is - * a simply wrapper around nxsched_setparam() that sets the errno value in + * a simply wrapper around nxsched_set_param() that sets the errno value in * the event of an error. * * NOTE: Setting a task's priority to the same value has a similar effect @@ -262,7 +262,7 @@ errout_with_lock: int sched_setparam(pid_t pid, FAR const struct sched_param *param) { - int ret = nxsched_setparam(pid, param); + int ret = nxsched_set_param(pid, param); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_setscheduler.c b/sched/sched/sched_setscheduler.c index c1996277065..14400d5f4b5 100644 --- a/sched/sched/sched_setscheduler.c +++ b/sched/sched/sched_setscheduler.c @@ -58,15 +58,15 @@ ****************************************************************************/ /**************************************************************************** - * Name: nxsched_setscheduler + * Name: nxsched_set_scheduler * * Description: - * nxsched_setscheduler() sets both the scheduling policy and the priority + * nxsched_set_scheduler() sets both the scheduling policy and the priority * for the task identified by pid. If pid equals zero, the scheduler of * the calling task will be set. The parameter 'param' holds the priority * of the thread under the new policy. * - * nxsched_setscheduler() is identical to the function sched_getparam(), + * nxsched_set_scheduler() is identical to the function sched_getparam(), * differing only in its return value: This function does not modify the * errno variable. * @@ -83,7 +83,7 @@ * through SCHED_PRIORITY_MAX. * * Returned Value: - * On success, nxsched_setscheduler() returns OK (zero). On error, a + * On success, nxsched_set_scheduler() returns OK (zero). On error, a * negated errno value is returned: * * EINVAL The scheduling policy is not one of the recognized policies. @@ -91,7 +91,7 @@ * ****************************************************************************/ -int nxsched_setscheduler(pid_t pid, int policy, +int nxsched_set_scheduler(pid_t pid, int policy, FAR const struct sched_param *param) { FAR struct tcb_s *tcb; @@ -121,7 +121,7 @@ int nxsched_setscheduler(pid_t pid, int policy, /* Verify that the pid corresponds to a real task */ - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); if (!tcb) { return -ESRCH; @@ -306,7 +306,7 @@ errout_with_irq: * the calling task will be set. The parameter 'param' holds the priority * of the thread under the new policy. * - * This function is a simply wrapper around nxsched_getparam() that + * This function is a simply wrapper around nxsched_get_param() that * sets the errno value in the event of an error. * * Input Parameters: @@ -329,7 +329,7 @@ errout_with_irq: int sched_setscheduler(pid_t pid, int policy, FAR const struct sched_param *param) { - int ret = nxsched_setscheduler(pid, policy, param); + int ret = nxsched_set_scheduler(pid, policy, param); if (ret < 0) { set_errno(-ret); diff --git a/sched/sched/sched_sporadic.c b/sched/sched/sched_sporadic.c index 33e6439b7c9..b511e0d1d9c 100644 --- a/sched/sched/sched_sporadic.c +++ b/sched/sched/sched_sporadic.c @@ -976,7 +976,7 @@ int sched_sporadic_reset(FAR struct tcb_s *tcb) * Called to start the next replenishment interval. This function is * called in the following circumstances: * - * - From up_unblocktask() via sched_resume_scheduler() when a task + * - From up_unblocktask() via nxsched_resume_scheduler() when a task * using the sporadic scheduling policy. * * This function does nothing if the budget phase as already elapsed or diff --git a/sched/sched/sched_suspendscheduler.c b/sched/sched/sched_suspendscheduler.c index 4581ddc4524..e2023573dc4 100644 --- a/sched/sched/sched_suspendscheduler.c +++ b/sched/sched/sched_suspendscheduler.c @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sched_suspend_scheduler + * Name: nxsched_suspend_scheduler * * Description: * Called by architecture specific implementations that starts task @@ -72,7 +72,7 @@ * ****************************************************************************/ -void sched_suspend_scheduler(FAR struct tcb_s *tcb) +void nxsched_suspend_scheduler(FAR struct tcb_s *tcb) { #ifdef CONFIG_SCHED_SPORADIC /* Perform sporadic schedule operations */ diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index edabfeeb060..fb51b890367 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -164,7 +164,7 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, int options) * thread it is our child. */ - ctcb = sched_gettcb((pid_t)id); + ctcb = nxsched_get_tcb((pid_t)id); #ifdef HAVE_GROUP_MEMBERS if (ctcb == NULL || ctcb->group->tg_pgrpid != rtcb->group->tg_grpid) @@ -207,7 +207,7 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, int options) * thread is our child. */ - ctcb = sched_gettcb((pid_t)id); + ctcb = nxsched_get_tcb((pid_t)id); #ifdef HAVE_GROUP_MEMBERS if (ctcb == NULL || ctcb->group->tg_pgrpid != rtcb->group->tg_grpid) diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index 45527be3211..68d2ca54dc5 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -78,7 +78,7 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options) /* Get the TCB corresponding to this PID */ - ctcb = sched_gettcb(pid); + ctcb = nxsched_get_tcb(pid); if (ctcb == NULL) { ret = -ECHILD; @@ -223,7 +223,7 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options) * already exited, then the PID will not map to a valid TCB. */ - ctcb = sched_gettcb(pid); + ctcb = nxsched_get_tcb(pid); if (ctcb != NULL) { /* Make sure that the thread it is our child. */ @@ -270,7 +270,7 @@ pid_t nx_waitpid(pid_t pid, int *stat_loc, int options) * thread it is our child. */ - ctcb = sched_gettcb(pid); + ctcb = nxsched_get_tcb(pid); #ifdef HAVE_GROUP_MEMBERS if (ctcb == NULL || ctcb->group->tg_pgrpid != rtcb->group->tg_grpid) diff --git a/sched/semaphore/sem_timeout.c b/sched/semaphore/sem_timeout.c index b248ae9cec2..7ac0e51cf0c 100644 --- a/sched/semaphore/sem_timeout.c +++ b/sched/semaphore/sem_timeout.c @@ -84,7 +84,7 @@ void nxsem_timeout(int argc, wdparm_t pid, ...) * task may no longer be active when this watchdog goes off. */ - wtcb = sched_gettcb((pid_t)pid); + wtcb = nxsched_get_tcb((pid_t)pid); /* It is also possible that an interrupt/context switch beat us to the * punch and already changed the task's state. diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 80776ea3606..44c89604973 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -513,7 +513,7 @@ int nxsig_dispatch(pid_t pid, FAR siginfo_t *info) /* Get the TCB associated with the pid */ - stcb = sched_gettcb(pid); + stcb = nxsched_get_tcb(pid); if (stcb != NULL) { /* The task/thread associated with this PID is still active. Get its @@ -552,7 +552,7 @@ int nxsig_dispatch(pid_t pid, FAR siginfo_t *info) /* Get the TCB associated with the pid */ - stcb = sched_gettcb(pid); + stcb = nxsched_get_tcb(pid); if (stcb == NULL) { return -ESRCH; diff --git a/sched/task/task_create.c b/sched/task/task_create.c index 43dff448de7..ed48a857fcc 100644 --- a/sched/task/task_create.c +++ b/sched/task/task_create.c @@ -157,7 +157,7 @@ static int nxthread_create(FAR const char *name, uint8_t ttype, return pid; errout_with_tcb: - sched_releasetcb((FAR struct tcb_s *)tcb, ttype); + nxsched_release_tcb((FAR struct tcb_s *)tcb, ttype); return ret; } diff --git a/sched/task/task_delete.c b/sched/task/task_delete.c index 6203b3344e6..e212386a303 100644 --- a/sched/task/task_delete.c +++ b/sched/task/task_delete.c @@ -101,7 +101,7 @@ int task_delete(pid_t pid) /* Get the TCB of the task to be deleted */ - dtcb = (FAR struct tcb_s *)sched_gettcb(pid); + dtcb = (FAR struct tcb_s *)nxsched_get_tcb(pid); if (dtcb == NULL) { /* The pid does not correspond to any known thread. The task diff --git a/sched/task/task_exit.c b/sched/task/task_exit.c index 8311dd906c8..6558dce9105 100644 --- a/sched/task/task_exit.c +++ b/sched/task/task_exit.c @@ -120,10 +120,10 @@ int nxtask_exit(void) #ifdef CONFIG_SMP /* Because clearing the global IRQ control in sched_removereadytorun() - * was moved to sched_resume_scheduler(). So call the API here. + * was moved to nxsched_resume_scheduler(). So call the API here. */ - sched_resume_scheduler(rtcb); + nxsched_resume_scheduler(rtcb); #endif /* We are now in a bad state -- the head of the ready to run task list diff --git a/sched/task/task_exithook.c b/sched/task/task_exithook.c index a7646358f01..84430b1b00f 100644 --- a/sched/task/task_exithook.c +++ b/sched/task/task_exithook.c @@ -462,7 +462,7 @@ static inline void nxtask_signalparent(FAR struct tcb_s *ctcb, int status) * handle multiple calls to nxtask_signalparent. */ - ptcb = sched_gettcb(ctcb->group->tg_ppid); + ptcb = nxsched_get_tcb(ctcb->group->tg_ppid); if (ptcb == NULL) { /* The parent no longer exists... bail */ diff --git a/sched/task/task_getgroup.c b/sched/task/task_getgroup.c index f0ba92c9ccb..a9a00181878 100644 --- a/sched/task/task_getgroup.c +++ b/sched/task/task_getgroup.c @@ -72,7 +72,7 @@ FAR struct task_group_s *task_getgroup(pid_t pid) { - FAR struct tcb_s *tcb = sched_gettcb(pid); + FAR struct tcb_s *tcb = nxsched_get_tcb(pid); if (tcb) { return tcb->group; diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 08462aba34a..e9faaa9c689 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -68,7 +68,7 @@ * OK on success; negative error value on failure appropriately. (See * nxtask_schedsetup() for possible failure conditions). On failure, the * caller is responsible for freeing the stack memory and for calling - * sched_releasetcb() to free the TCB (which could be in most any state). + * nxsched_release_tcb() to free the TCB (which could be in most any state). * ****************************************************************************/ diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c index 5f065ab232f..e5d5177fd2a 100644 --- a/sched/task/task_posixspawn.c +++ b/sched/task/task_posixspawn.c @@ -374,10 +374,10 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, /* Get the priority of this (parent) task */ - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { - serr("ERROR: nxsched_getparam failed: %d\n", ret); + serr("ERROR: nxsched_get_param failed: %d\n", ret); spawn_semgive(&g_spawn_parmsem); return -ret; } diff --git a/sched/task/task_prctl.c b/sched/task/task_prctl.c index 77ad50192ee..8afbe1d1454 100644 --- a/sched/task/task_prctl.c +++ b/sched/task/task_prctl.c @@ -102,11 +102,11 @@ int prctl(int option, ...) } else { - tcb = sched_gettcb(pid); + tcb = nxsched_get_tcb(pid); } /* An invalid pid will be indicated by a NULL TCB returned from - * sched_gettcb() + * nxsched_get_tcb() */ if (tcb == NULL) diff --git a/sched/task/task_reparent.c b/sched/task/task_reparent.c index d919d95b75b..db6d153a27c 100644 --- a/sched/task/task_reparent.c +++ b/sched/task/task_reparent.c @@ -93,7 +93,7 @@ int task_reparent(pid_t ppid, pid_t chpid) /* Get the child tasks task group */ - tcb = sched_gettcb(chpid); + tcb = nxsched_get_tcb(chpid); if (!tcb) { ret = -ECHILD; @@ -132,7 +132,7 @@ int task_reparent(pid_t ppid, pid_t chpid) { /* Get the new parent task's task group (pgrp) */ - tcb = sched_gettcb(ppid); + tcb = nxsched_get_tcb(ppid); if (!tcb) { ret = -ESRCH; @@ -226,7 +226,7 @@ int task_reparent(pid_t ppid, pid_t chpid) /* Get the child tasks TCB (chtcb) */ - chtcb = sched_gettcb(chpid); + chtcb = nxsched_get_tcb(chpid); if (!chtcb) { ret = -ECHILD; @@ -239,7 +239,7 @@ int task_reparent(pid_t ppid, pid_t chpid) /* Get the TCB of the child task's parent (otcb) */ - otcb = sched_gettcb(opid); + otcb = nxsched_get_tcb(opid); if (!otcb) { ret = -ESRCH; @@ -258,7 +258,7 @@ int task_reparent(pid_t ppid, pid_t chpid) /* Get the new parent task's TCB (ptcb) */ - ptcb = sched_gettcb(ppid); + ptcb = nxsched_get_tcb(ppid); if (!ptcb) { ret = -ESRCH; diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 7d33d2a8983..052634024cb 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -113,7 +113,7 @@ int task_restart(pid_t pid) /* Find for the TCB associated with matching pid */ - tcb = (FAR struct task_tcb_s *)sched_gettcb(pid); + tcb = (FAR struct task_tcb_s *)nxsched_get_tcb(pid); #ifndef CONFIG_DISABLE_PTHREAD if (!tcb || (tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index 1cec4377351..36935979842 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -303,7 +303,7 @@ static inline void nxtask_dupdspace(FAR struct tcb_s *tcb) { /* Copy the D-Space structure reference and increment the reference * count on the memory. The D-Space memory will persist until the - * last thread exits (see sched_releasetcb()). + * last thread exits (see nxsched_release_tcb()). */ tcb->dspace = rtcb->dspace; diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index 60a1af98238..475000f9037 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -112,7 +112,7 @@ static int nxtask_spawn_exec(FAR pid_t *pidp, FAR const char *name, /* Set the default priority to the same priority as this task */ - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { ret = -ret; @@ -366,10 +366,10 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, /* Get the priority of this (parent) task */ - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { - serr("ERROR: nxsched_getparam failed: %d\n", ret); + serr("ERROR: nxsched_get_param failed: %d\n", ret); spawn_semgive(&g_spawn_parmsem); return -ret; } diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c index 7e803221559..e7da24723b9 100644 --- a/sched/task/task_spawnparms.c +++ b/sched/task/task_spawnparms.c @@ -207,7 +207,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) * modified. */ - ret = nxsched_getparam(pid, ¶m); + ret = nxsched_get_param(pid, ¶m); if (ret < 0) { return ret; @@ -219,7 +219,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) param.sched_priority = attr->priority; /* If we are setting *both* the priority and the scheduler, - * then we will call nxsched_setscheduler() below. + * then we will call nxsched_set_scheduler() below. */ if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) == 0) @@ -227,7 +227,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) sinfo("Setting priority=%d for pid=%d\n", param.sched_priority, pid); - ret = nxsched_setparam(pid, ¶m); + ret = nxsched_set_param(pid, ¶m); if (ret < 0) { return ret; @@ -237,12 +237,12 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) /* If we are only changing the scheduling policy, then reset * the priority to the default value (the same as this thread) in - * preparation for the nxsched_setscheduler() call below. + * preparation for the nxsched_set_scheduler() call below. */ else if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) != 0) { - ret = nxsched_getparam(0, ¶m); + ret = nxsched_get_param(0, ¶m); if (ret < 0) { return ret; @@ -268,7 +268,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) param.sched_ss_init_budget.tv_sec = attr->budget.tv_sec; param.sched_ss_init_budget.tv_nsec = attr->budget.tv_nsec; #endif - nxsched_setscheduler(pid, attr->policy, ¶m); + nxsched_set_scheduler(pid, attr->policy, ¶m); } return OK; diff --git a/sched/task/task_terminate.c b/sched/task/task_terminate.c index d146dcc97a8..ca1e1fcfada 100644 --- a/sched/task/task_terminate.c +++ b/sched/task/task_terminate.c @@ -115,7 +115,7 @@ int nxtask_terminate(pid_t pid, bool nonblocking) /* Find for the TCB associated with matching PID */ - dtcb = sched_gettcb(pid); + dtcb = nxsched_get_tcb(pid); if (!dtcb) { /* This PID does not correspond to any known task */ @@ -197,7 +197,7 @@ int nxtask_terminate(pid_t pid, bool nonblocking) /* Deallocate its TCB */ - return sched_releasetcb(dtcb, dtcb->flags & TCB_FLAG_TTYPE_MASK); + return nxsched_release_tcb(dtcb, dtcb->flags & TCB_FLAG_TTYPE_MASK); errout_with_lock: leave_critical_section(flags); diff --git a/sched/task/task_vfork.c b/sched/task/task_vfork.c index a9c64710aa2..ec2a780f334 100644 --- a/sched/task/task_vfork.c +++ b/sched/task/task_vfork.c @@ -358,7 +358,7 @@ FAR struct task_tcb_s *nxtask_vforksetup(start_t retaddr, size_t *argsize) return child; errout_with_tcb: - sched_releasetcb((FAR struct tcb_s *)child, ttype); + nxsched_release_tcb((FAR struct tcb_s *)child, ttype); set_errno(-ret); return NULL; } @@ -509,7 +509,7 @@ void nxtask_vforkabort(FAR struct task_tcb_s *child, int errcode) /* Release the TCB */ - sched_releasetcb((FAR struct tcb_s *)child, + nxsched_release_tcb((FAR struct tcb_s *)child, child->cmn.flags & TCB_FLAG_TTYPE_MASK); set_errno(errcode); } diff --git a/sched/wqueue/kwork_inherit.c b/sched/wqueue/kwork_inherit.c index 9765b715321..75d95a452cb 100644 --- a/sched/wqueue/kwork_inherit.c +++ b/sched/wqueue/kwork_inherit.c @@ -61,7 +61,7 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio) /* Get the TCB of the low priority worker thread from the process ID. */ - wtcb = sched_gettcb(wpid); + wtcb = nxsched_get_tcb(wpid); DEBUGASSERT(wtcb); #if CONFIG_SEM_NNESTPRIO > 0 @@ -180,7 +180,7 @@ static void lpwork_restoreworker(pid_t wpid, uint8_t reqprio) /* Get the TCB of the low priority worker thread from the process ID. */ - wtcb = sched_gettcb(wpid); + wtcb = nxsched_get_tcb(wpid); DEBUGASSERT(wtcb); /* Was the priority of the worker thread boosted? If so, then drop its diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 9f5a50539dc..92a04cd6b20 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -114,8 +114,8 @@ "sched_getcpu","sched.h","defined(CONFIG_SMP)","int" "sched_getparam","sched.h","","int","pid_t","FAR struct sched_param *" "sched_getscheduler","sched.h","","int","pid_t" -"sched_get_stackinfo","nuttx/sched.h","","int","pid_t","FAR struct stackinfo_s *" -"sched_getstreams","nuttx/sched.h","CONFIG_NFILE_STREAMS > 0","FAR struct streamlist *" +"nxsched_get_stackinfo","nuttx/sched.h","","int","pid_t","FAR struct stackinfo_s *" +"nxsched_get_streams","nuttx/sched.h","CONFIG_NFILE_STREAMS > 0","FAR struct streamlist *" "sched_lock","sched.h","","int" "sched_lockcount","sched.h","","int" "sched_rr_get_interval","sched.h","","int","pid_t","struct timespec *"