mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
include/nuttx/sched.h: Make naming of all internal names consistent:
1. Add internal scheduler functions should begin with nxsched_, not sched_ 2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
8b289023bf
commit
a4218e2144
@@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* 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
|
#endif
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void up_release_pending(void)
|
|||||||
* Update scheduler parameters.
|
* Update scheduler parameters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -118,7 +118,7 @@ void up_release_pending(void)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -173,7 +173,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -134,7 +134,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static inline void up_showtasks(void)
|
|||||||
{
|
{
|
||||||
/* Dump interesting properties of each task in the crash environment */
|
/* Dump interesting properties of each task in the crash environment */
|
||||||
|
|
||||||
sched_foreach(up_taskdump, NULL);
|
nxsched_foreach(up_taskdump, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_showtasks()
|
# define up_showtasks()
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
|
|||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
case SYS_syscall_return:
|
case SYS_syscall_return:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = (int)rtcb->xcp.nsyscalls - 1;
|
int index = (int)rtcb->xcp.nsyscalls - 1;
|
||||||
|
|
||||||
/* Make sure that there is a saved syscall return address. */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler:
|
case SYS_signal_handler:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
|
|
||||||
/* Remember the caller's return address */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler_return:
|
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. */
|
/* 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:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
/* Verify that the SYS call number is within range */
|
/* Verify that the SYS call number is within range */
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
int up_shmat(FAR uintptr_t *pages, unsigned int npages, uintptr_t vaddr)
|
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 struct task_group_s *group;
|
||||||
FAR uintptr_t *l1entry;
|
FAR uintptr_t *l1entry;
|
||||||
FAR uint32_t *l2table;
|
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)
|
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 struct task_group_s *group;
|
||||||
FAR uintptr_t *l1entry;
|
FAR uintptr_t *l1entry;
|
||||||
FAR uint32_t *l2table;
|
FAR uint32_t *l2table;
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ static inline void up_showtasks(void)
|
|||||||
{
|
{
|
||||||
/* Dump interesting properties of each task in the crash environment */
|
/* Dump interesting properties of each task in the crash environment */
|
||||||
|
|
||||||
sched_foreach(up_taskdump, NULL);
|
nxsched_foreach(up_taskdump, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_showtasks()
|
# define up_showtasks()
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* 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
|
#endif
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(tcb);
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||||
/* Notify that we are paused */
|
/* Notify that we are paused */
|
||||||
@@ -170,7 +170,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(tcb);
|
nxsched_resume_scheduler(tcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment changes
|
/* Then switch contexts. Any necessary address environment changes
|
||||||
* will be made when the interrupt returns.
|
* will be made when the interrupt returns.
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ int arm_start_handler(int irq, FAR void *context, FAR void *arg)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* 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 */
|
/* Dump registers so that we can see what is going to happen on return */
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
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 struct task_group_s *group;
|
||||||
FAR uint32_t *l2table;
|
FAR uint32_t *l2table;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -117,7 +117,7 @@ void up_release_pending(void)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -173,7 +173,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
case SYS_syscall_return:
|
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;
|
int index = (int)rtcb->xcp.nsyscalls - 1;
|
||||||
|
|
||||||
/* Make sure that there is a saved SYSCALL return address. */
|
/* 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:
|
case SYS_signal_handler:
|
||||||
{
|
{
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
|
|
||||||
/* Remember the caller's return address */
|
/* Remember the caller's return address */
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
case SYS_signal_handler_return:
|
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. */
|
/* Set up to return to the kernel-mode signal dispatching logic. */
|
||||||
|
|
||||||
@@ -420,7 +420,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
/* Verify that the SYS call number is within range */
|
/* Verify that the SYS call number is within range */
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -155,7 +155,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ static inline void up_showtasks(void)
|
|||||||
{
|
{
|
||||||
/* Dump interesting properties of each task in the crash environment */
|
/* Dump interesting properties of each task in the crash environment */
|
||||||
|
|
||||||
sched_foreach(up_taskdump, NULL);
|
nxsched_foreach(up_taskdump, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_showtasks()
|
# define up_showtasks()
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
|
|||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
case SYS_syscall_return:
|
case SYS_syscall_return:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = (int)rtcb->xcp.nsyscalls - 1;
|
int index = (int)rtcb->xcp.nsyscalls - 1;
|
||||||
|
|
||||||
/* Make sure that there is a saved syscall return address. */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler:
|
case SYS_signal_handler:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
|
|
||||||
/* Remember the caller's return address */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler_return:
|
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. */
|
/* 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:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
/* Verify that the SYS call number is within range */
|
/* Verify that the SYS call number is within range */
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ static inline void up_showtasks(void)
|
|||||||
{
|
{
|
||||||
/* Dump interesting properties of each task in the crash environment */
|
/* Dump interesting properties of each task in the crash environment */
|
||||||
|
|
||||||
sched_foreach(up_taskdump, NULL);
|
nxsched_foreach(up_taskdump, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_showtasks()
|
# define up_showtasks()
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. */
|
/* Then switch contexts. */
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -109,7 +109,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* 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 */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
case SYS_syscall_return:
|
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;
|
int index = (int)rtcb->xcp.nsyscalls - 1;
|
||||||
|
|
||||||
/* Make sure that there is a saved SYSCALL return address. */
|
/* 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:
|
case SYS_signal_handler:
|
||||||
{
|
{
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
|
|
||||||
/* Remember the caller's return address */
|
/* Remember the caller's return address */
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
case SYS_signal_handler_return:
|
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. */
|
/* Set up to return to the kernel-mode signal dispatching logic. */
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
/* Verify that the SYS call number is within range */
|
/* Verify that the SYS call number is within range */
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -137,7 +137,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ static inline void up_showtasks(void)
|
|||||||
{
|
{
|
||||||
/* Dump interesting properties of each task in the crash environment */
|
/* Dump interesting properties of each task in the crash environment */
|
||||||
|
|
||||||
sched_foreach(up_taskdump, NULL);
|
nxsched_foreach(up_taskdump, NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_showtasks()
|
# define up_showtasks()
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
|
|||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
case SYS_syscall_return:
|
case SYS_syscall_return:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = (int)rtcb->xcp.nsyscalls - 1;
|
int index = (int)rtcb->xcp.nsyscalls - 1;
|
||||||
|
|
||||||
/* Make sure that there is a saved syscall return address. */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler:
|
case SYS_signal_handler:
|
||||||
{
|
{
|
||||||
struct tcb_s *rtcb = sched_self();
|
struct tcb_s *rtcb = nxsched_self();
|
||||||
|
|
||||||
/* Remember the caller's return address */
|
/* 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
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
case SYS_signal_handler_return:
|
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. */
|
/* 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:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = nxsched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
/* Verify that the SYS call number is within range */
|
/* Verify that the SYS call number is within range */
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -138,12 +138,12 @@ void _exit(int status)
|
|||||||
|
|
||||||
#ifdef CONFIG_DUMP_ON_EXIT
|
#ifdef CONFIG_DUMP_ON_EXIT
|
||||||
sinfo("Other tasks:\n");
|
sinfo("Other tasks:\n");
|
||||||
sched_foreach(_up_dumponexit, NULL);
|
nxsched_foreach(_up_dumponexit, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(tcb);
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
|
||||||
/* Destroy the task at the head of the ready to run list. */
|
/* Destroy the task at the head of the ready to run list. */
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ void _exit(int status)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(tcb);
|
nxsched_resume_scheduler(tcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(tcb);
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||||
/* Notify that we are paused */
|
/* Notify that we are paused */
|
||||||
@@ -245,7 +245,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(tcb);
|
nxsched_resume_scheduler(tcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment changes
|
/* Then switch contexts. Any necessary address environment changes
|
||||||
* will be made when the interrupt returns.
|
* will be made when the interrupt returns.
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(tcb);
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||||
/* Notify that we are paused */
|
/* Notify that we are paused */
|
||||||
@@ -176,7 +176,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(tcb);
|
nxsched_resume_scheduler(tcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment changes
|
/* Then switch contexts. Any necessary address environment changes
|
||||||
* will be made when the interrupt returns.
|
* will be made when the interrupt returns.
|
||||||
|
|||||||
@@ -1072,11 +1072,11 @@ FAR struct i2s_dev_s *lc823450_i2sdev_initialize(void)
|
|||||||
|
|
||||||
/* Backup the current affinity */
|
/* 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 */
|
/* 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);
|
nxsig_usleep(10 * 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1089,7 +1089,7 @@ FAR struct i2s_dev_s *lc823450_i2sdev_initialize(void)
|
|||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/* Restore the original affinity */
|
/* Restore the original affinity */
|
||||||
|
|
||||||
nxsched_setaffinity(getpid(), sizeof(cpuset0), &cpuset0);
|
nxsched_set_affinity(getpid(), sizeof(cpuset0), &cpuset0);
|
||||||
nxsig_usleep(10 * 1000);
|
nxsig_usleep(10 * 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(tcb);
|
nxsched_suspend_scheduler(tcb);
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||||
/* Notify that we are paused */
|
/* Notify that we are paused */
|
||||||
@@ -177,7 +177,7 @@ int up_cpu_paused(int cpu)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(tcb);
|
nxsched_resume_scheduler(tcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment changes
|
/* Then switch contexts. Any necessary address environment changes
|
||||||
* will be made when the interrupt returns.
|
* will be made when the interrupt returns.
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
|
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
if (g_current_regs)
|
if (g_current_regs)
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Switch context to the context of the task at the head of the
|
/* Switch context to the context of the task at the head of the
|
||||||
* ready to run list.
|
* ready to run list.
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||||||
{
|
{
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* 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 */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any new address environment needed by
|
/* Then switch contexts. Any new address environment needed by
|
||||||
* the new thread will be instantiated before the return from
|
* 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
|
#endif
|
||||||
/* Reset scheduler parameters */
|
/* Reset scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void up_release_pending(void)
|
|||||||
* Update scheduler parameters.
|
* Update scheduler parameters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we operating in interrupt context? */
|
/* Are we operating in interrupt context? */
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ void up_release_pending(void)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -130,7 +130,7 @@ void up_release_pending(void)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Then switch contexs */
|
/* Then switch contexs */
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_suspend_scheduler(rtcb);
|
nxsched_suspend_scheduler(rtcb);
|
||||||
|
|
||||||
/* Are we in an interrupt handler? */
|
/* Are we in an interrupt handler? */
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(rtcb);
|
nxsched_resume_scheduler(rtcb);
|
||||||
|
|
||||||
/* Then switch contexts. Any necessary address environment
|
/* Then switch contexts. Any necessary address environment
|
||||||
* changes will be made when the interrupt returns.
|
* changes will be made when the interrupt returns.
|
||||||
@@ -184,7 +184,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
#endif
|
#endif
|
||||||
/* Update scheduler parameters */
|
/* Update scheduler parameters */
|
||||||
|
|
||||||
sched_resume_scheduler(nexttcb);
|
nxsched_resume_scheduler(nexttcb);
|
||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user