Remove up_assert_code

This commit is contained in:
Gregory Nutt
2013-04-25 15:19:59 -06:00
parent e9a29d9465
commit 86b815373a
142 changed files with 1664 additions and 2190 deletions
+5
View File
@@ -4623,3 +4623,8 @@
KL architecture directory as need to get the interrupt-driven
serial driver to work. The Freedom KL25Z NSH configuration now
works (2014-4-25).
* include/nuttx/assert.h, arch/*/src/*/up_assert.c, and other file:
Remove up_assert_code(). While asserting with an encoded value
could be a good feature, the codes have not be well utilized nor
documented. Give that situation it is better to remove the API
and reduce the footprint a little (2014-4-25).
+2 -4
View File
@@ -1910,13 +1910,11 @@ The system can be re-made subsequently by just typing <code>make</code>.
<h3><a name="upassert">4.1.13 <code>up_assert()</code></a></h3>
<p><b>Prototype</b>:<br>
<code>void up_assert(FAR const uint8_t *filename, int linenum);</code></br>
<code>void up_assert_code(FAR const uint8_t *filename, int linenum, int error_code);</code></br>
<code>void up_assert(FAR const uint8_t *filename, int linenum);</code>
</p>
<p><b>Description</b>.
Assertions may be handled in an architecture-specific
way.
Assertions may be handled in an architecture-specific way.
</p>
<h3><a name="upschedulesigaction">4.1.14 <code>up_schedule_sigaction()</code></a></h3>
+1 -25
View File
@@ -1,7 +1,7 @@
/************************************************************************
* up_assert.c
*
* Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -116,27 +116,3 @@ void up_assert(const uint8_t *filename, int lineno)
up_dumpstack();
_up_assert(EXIT_FAILURE);
}
/************************************************************************
* Name: up_assert_code
************************************************************************/
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#if CONFIG_TASK_NAME_SIZE > 0
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode);
#else
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode);
#endif
up_dumpstack();
_up_assert(errorcode);
}
+65 -70
View File
@@ -85,88 +85,83 @@
void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
{
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
(tcb->task_state > LAST_READY_TO_RUN_STATE))
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
dbg("Blocking TCB=%p\n", tcb);
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
PANIC(OSERR_BADBLOCKSTATE);
switch_needed |= sched_mergepending();
}
else
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Are we in an interrupt handler? */
dbg("Blocking TCB=%p\n", tcb);
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
if (g_irqtos)
{
switch_needed |= sched_mergepending();
}
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
/* Are we in an interrupt handler? */
if (g_irqtos)
{
/* Yes, then we have to do things differently.
* Just copy the current registers into the OLD rtcb.
*/
up_saveirqcontext(&tcb->xcp);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
* from the interrupt.
*/
g_irqcontext = &rtcb->xcp;
}
/* Copy the user C context into the TCB at the (old) head of the
* g_readytorun Task list. if up_savecontext returns a non-zero
* value, then this is really the previously running task restarting!
/* Yes, then we have to do things differently.
* Just copy the current registers into the OLD rtcb.
*/
else if (!up_savecontext(&rtcb->xcp))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
up_saveirqcontext(&tcb->xcp);
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
/* Then switch contexts */
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
up_restorecontext(&rtcb->xcp);
}
/* Then setup so that the context will be performed on exit
* from the interrupt.
*/
g_irqcontext = &rtcb->xcp;
}
/* Copy the user C context into the TCB at the (old) head of the
* g_readytorun Task list. if up_savecontext returns a non-zero
* value, then this is really the previously running task restarting!
*/
else if (!up_savecontext(&rtcb->xcp))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
up_restorecontext(&rtcb->xcp);
}
}
}
+1 -1
View File
@@ -99,7 +99,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
#endif
)
{
PANIC(OSERR_BADREPRIORITIZESTATE);
PANIC();
}
else
{
+54 -59
View File
@@ -1,7 +1,7 @@
/************************************************************************
* up_unblocktask.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -82,85 +82,80 @@
void up_unblock_task(FAR struct tcb_s *tcb)
{
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
(tcb->task_state > LAST_BLOCKED_STATE))
{
PANIC(OSERR_BADUNBLOCKSTATE);
}
else
{
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
(tcb->task_state <= LAST_BLOCKED_STATE));
dbg("Unblocking TCB=%p\n", tcb);
dbg("Unblocking TCB=%p\n", tcb);
/* Remove the task from the blocked task list */
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
sched_removeblocked(tcb);
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
#if CONFIG_RR_INTERVAL > 0
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
#endif
/* Add the task in the correct location in the prioritized
* g_readytorun task list
*/
/* Add the task in the correct location in the prioritized
* g_readytorun task list
*/
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
*/
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
*/
if (g_irqtos)
{
/* Yes, then we have to do things differently.
* Just copy the current stack into the OLD rtcb.
*/
if (g_irqtos)
{
/* Yes, then we have to do things differently.
* Just copy the current stack into the OLD rtcb.
*/
up_saveirqcontext(&rtcb->xcp);
up_saveirqcontext(&rtcb->xcp);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then setup so that the context will be performed on exit
* from the interrupt.
*/
/* Then setup so that the context will be performed on exit
* from the interrupt.
*/
g_irqcontext = &rtcb->xcp;
}
g_irqcontext = &rtcb->xcp;
}
/* We are not in an interrupt andler. Copy the user C context
* into the TCB of the task that was previously active. if
* up_savecontext returns a non-zero value, then this is really the
* previously running task restarting!
*/
/* We are not in an interrupt andler. Copy the user C context
* into the TCB of the task that was previously active. if
* up_savecontext returns a non-zero value, then this is really the
* previously running task restarting!
*/
else if (!up_savecontext(&rtcb->xcp))
{
/* Restore the exception context of the new task that is ready to
* run (probably tcb). This is the new rtcb at the head of the
* g_readytorun task list.
*/
else if (!up_savecontext(&rtcb->xcp))
{
/* Restore the exception context of the new task that is ready to
* run (probably tcb). This is the new rtcb at the head of the
* g_readytorun task list.
*/
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
/* Then switch contexts */
up_restorecontext(&rtcb->xcp);
}
}
up_restorecontext(&rtcb->xcp);
}
}
}
+2 -24
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_assert.c
*
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2010, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -291,6 +291,7 @@ void up_assert(const uint8_t *filename, int lineno)
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
@@ -301,26 +302,3 @@ void up_assert(const uint8_t *filename, int lineno)
up_dumpstate();
_up_assert(EXIT_FAILURE);
}
/****************************************************************************
* Name: up_assert_code
****************************************************************************/
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode);
#else
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode);
#endif
up_dumpstate();
_up_assert(errorcode);
}
+60 -65
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_blocktask.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -86,82 +86,77 @@
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
(tcb->task_state > LAST_READY_TO_RUN_STATE))
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
PANIC(OSERR_BADBLOCKSTATE);
switch_needed |= sched_mergepending();
}
else
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Are we in an interrupt handler? */
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
if (current_regs)
{
switch_needed |= sched_mergepending();
}
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
/* Are we in an interrupt handler? */
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* Copy the user C context into the TCB at the (old) head of the
* g_readytorun Task list. if up_saveusercontext returns a non-zero
* value, then this is really the previously running task restarting!
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
up_savestate(rtcb->xcp.regs);
rtcb = (struct tcb_s*)g_readytorun.head;
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
/* Then switch contexts */
rtcb = (struct tcb_s*)g_readytorun.head;
up_fullcontextrestore(rtcb->xcp.regs);
}
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* Copy the user C context into the TCB at the (old) head of the
* g_readytorun Task list. if up_saveusercontext returns a non-zero
* value, then this is really the previously running task restarting!
*/
else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_fullcontextrestore(rtcb->xcp.regs);
}
}
}
+3 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_dataabort.c
*
* Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -179,7 +179,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
segfault:
#endif
lldbg("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr);
PANIC(OSERR_ERREXCEPTION);
PANIC();
}
#else /* CONFIG_PAGING */
@@ -195,7 +195,7 @@ void up_dataabort(uint32_t *regs)
/* Crash -- possibly showing diagnost debug information. */
lldbg("Data abort. PC: %08x\n", regs[REG_PC]);
PANIC(OSERR_ERREXCEPTION);
PANIC();
}
#endif /* CONFIG_PAGING */
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_doirq.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ void up_doirq(int irq, uint32_t *regs)
{
up_ledon(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
uint32_t *savestate;
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/src/up_prefetchabort.c
*
* Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -149,6 +149,6 @@ void up_prefetchabort(uint32_t *regs)
#endif
{
lldbg("Prefetch abort. PC: %08x\n", regs[REG_PC]);
PANIC(OSERR_ERREXCEPTION);
PANIC();
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_reprioritizertr.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -98,7 +98,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
#endif
)
{
PANIC(OSERR_BADREPRIORITIZESTATE);
PANIC();
}
else
{
+1 -1
View File
@@ -92,5 +92,5 @@ void up_syscall(uint32_t *regs)
{
lldbg("Syscall from 0x%x\n", regs[REG_PC]);
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
}
+49 -54
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_unblocktask.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -81,79 +81,74 @@
void up_unblock_task(struct tcb_s *tcb)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
(tcb->task_state > LAST_BLOCKED_STATE))
{
PANIC(OSERR_BADUNBLOCKSTATE);
}
else
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
(tcb->task_state <= LAST_BLOCKED_STATE));
/* Remove the task from the blocked task list */
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
sched_removeblocked(tcb);
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
#if CONFIG_RR_INTERVAL > 0
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
#endif
/* Add the task in the correct location in the prioritized
* g_readytorun task list
/* Add the task in the correct location in the prioritized
* g_readytorun task list
*/
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
*/
if (sched_addreadytorun(tcb))
if (current_regs)
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* We are not in an interrupt handler. Copy the user C context
* into the TCB of the task that was previously active. if
* up_saveusercontext returns a non-zero value, then this is really the
* previously running task restarting!
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the new task that is ready to
* run (probably tcb). This is the new rtcb at the head of the
* g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
up_fullcontextrestore(rtcb->xcp.regs);
}
/* We are not in an interrupt handler. Copy the user C context
* into the TCB of the task that was previously active. if
* up_saveusercontext returns a non-zero value, then this is really the
* previously running task restarting!
*/
else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the new task that is ready to
* run (probably tcb). This is the new rtcb at the head of the
* g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_fullcontextrestore(rtcb->xcp.regs);
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/arm/up_undefinedinsn.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -77,5 +77,5 @@ void up_undefinedinsn(uint32_t *regs)
{
lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]);
current_regs = regs;
PANIC(OSERR_UNDEFINEDINSN);
PANIC();
}
+2 -22
View File
@@ -307,6 +307,7 @@ void up_assert(const uint8_t *filename, int lineno)
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
@@ -314,28 +315,7 @@ void up_assert(const uint8_t *filename, int lineno)
lldbg("Assertion failed at file:%s line: %d\n",
filename, lineno);
#endif
up_dumpstate();
_up_assert(EXIT_FAILURE);
}
/****************************************************************************
* Name: up_assert_code
****************************************************************************/
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode);
#else
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode);
#endif
up_dumpstate();
_up_assert(errorcode);
}
+58 -63
View File
@@ -85,82 +85,77 @@
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
(tcb->task_state > LAST_READY_TO_RUN_STATE))
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
PANIC(OSERR_BADBLOCKSTATE);
switch_needed |= sched_mergepending();
}
else
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Are we in an interrupt handler? */
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
if (current_regs)
{
switch_needed |= sched_mergepending();
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* Now, perform the context switch if one is needed */
/* No, then we will need to perform the user context switch */
if (switch_needed)
else
{
/* Are we in an interrupt handler? */
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* No, then we will need to perform the user context switch */
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
{
up_ledon(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
uint32_t *savestate;
+2 -2
View File
@@ -151,6 +151,6 @@ int up_hardfault(int irq, FAR void *context)
(void)irqsave();
lldbg("PANIC!!! Hard fault\n");
PANIC(OSERR_UNEXPECTEDISR);
return OK;
PANIC();
return OK; /* Won't get here */
}
+1 -1
View File
@@ -98,7 +98,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
#endif
)
{
PANIC(OSERR_BADREPRIORITIZESTATE);
PANIC();
}
else
{
+44 -49
View File
@@ -80,77 +80,72 @@
void up_unblock_task(struct tcb_s *tcb)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
(tcb->task_state > LAST_BLOCKED_STATE))
{
PANIC(OSERR_BADUNBLOCKSTATE);
}
else
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
(tcb->task_state <= LAST_BLOCKED_STATE));
/* Remove the task from the blocked task list */
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
sched_removeblocked(tcb);
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
#if CONFIG_RR_INTERVAL > 0
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
#endif
/* Add the task in the correct location in the prioritized
* g_readytorun task list
/* Add the task in the correct location in the prioritized
* g_readytorun task list
*/
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
*/
if (sched_addreadytorun(tcb))
if (current_regs)
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
up_restorestate(rtcb->xcp.regs);
}
/* No, then we will need to perform the user context switch */
/* No, then we will need to perform the user context switch */
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
}
}
+2 -22
View File
@@ -318,6 +318,7 @@ void up_assert(const uint8_t *filename, int lineno)
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
@@ -325,28 +326,7 @@ void up_assert(const uint8_t *filename, int lineno)
lldbg("Assertion failed at file:%s line: %d\n",
filename, lineno);
#endif
up_dumpstate();
_up_assert(EXIT_FAILURE);
}
/****************************************************************************
* Name: up_assert_code
****************************************************************************/
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode);
#else
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode);
#endif
up_dumpstate();
_up_assert(errorcode);
}
+59 -64
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_blocktask.c
*
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -86,82 +86,77 @@
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
(tcb->task_state > LAST_READY_TO_RUN_STATE))
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
PANIC(OSERR_BADBLOCKSTATE);
switch_needed |= sched_mergepending();
}
else
/* Now, perform the context switch if one is needed */
if (switch_needed)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Are we in an interrupt handler? */
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
* most likely case), then a context switch to the next
* ready-to-run task is needed. In this case, it should
* also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
if (current_regs)
{
switch_needed |= sched_mergepending();
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* Now, perform the context switch if one is needed */
/* No, then we will need to perform the user context switch */
if (switch_needed)
else
{
/* Are we in an interrupt handler? */
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
/* No, then we will need to perform the user context switch */
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_doirq.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
{
up_ledon(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
uint32_t *savestate;
+1 -1
View File
@@ -181,6 +181,6 @@ int up_hardfault(int irq, FAR void *context)
(void)irqsave();
lldbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return OK;
}
+3 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_memfault.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -126,6 +126,6 @@ int up_memfault(int irq, FAR void *context)
# endif
#endif
PANIC(OSERR_UNEXPECTEDISR);
return OK;
PANIC();
return OK; /* Won't get here */
}
+1 -1
View File
@@ -98,7 +98,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
#endif
)
{
PANIC(OSERR_BADREPRIORITIZESTATE);
PANIC();
}
else
{
+44 -49
View File
@@ -81,77 +81,72 @@
void up_unblock_task(struct tcb_s *tcb)
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Verify that the context switch can be performed */
if ((tcb->task_state < FIRST_BLOCKED_STATE) ||
(tcb->task_state > LAST_BLOCKED_STATE))
{
PANIC(OSERR_BADUNBLOCKSTATE);
}
else
{
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
(tcb->task_state <= LAST_BLOCKED_STATE));
/* Remove the task from the blocked task list */
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
sched_removeblocked(tcb);
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
/* Reset its timeslice. This is only meaningful for round
* robin tasks but it doesn't here to do it for everything
*/
#if CONFIG_RR_INTERVAL > 0
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
#endif
/* Add the task in the correct location in the prioritized
* g_readytorun task list
/* Add the task in the correct location in the prioritized
* g_readytorun task list
*/
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
*/
if (sched_addreadytorun(tcb))
if (current_regs)
{
/* The currently active task has changed! We need to do
* a context switch to the new task.
*
* Are we in an interrupt handler?
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
if (current_regs)
{
/* Yes, then we have to do things differently.
* Just copy the current_regs into the OLD rtcb.
*/
up_savestate(rtcb->xcp.regs);
up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
rtcb = (struct tcb_s*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
/* Then switch contexts */
up_restorestate(rtcb->xcp.regs);
}
up_restorestate(rtcb->xcp.regs);
}
/* No, then we will need to perform the user context switch */
/* No, then we will need to perform the user context switch */
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
else
{
/* Switch context to the context of the task at the head of the
* ready to run list.
*/
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
struct tcb_s *nexttcb = (struct tcb_s*)g_readytorun.head;
up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs);
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
/* up_switchcontext forces a context switch to the task at the
* head of the ready-to-run list. It does not 'return' in the
* normal sense. When it does return, it is because the blocked
* task is again ready to run and has execution priority.
*/
}
}
}
+1 -1
View File
@@ -547,7 +547,7 @@ static int up_interrupt(int irq, void *context)
}
else
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -607,7 +607,7 @@ static int up_interrupt(int irq, void *context)
}
else
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -76,7 +76,7 @@ void up_decodeirq(uint32_t* regs)
#ifdef CONFIG_SUPPRESS_INTERRUPTS
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
/* Decode the interrupt. First, fetch the interrupt id register. */
+1 -1
View File
@@ -485,7 +485,7 @@ static int up_interrupt(int irq, void *context)
}
else
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -76,7 +76,7 @@ void up_decodeirq(uint32_t* regs)
#ifdef CONFIG_SUPPRESS_INTERRUPTS
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
uint32_t* savestate;
uint32_t regval;
+1 -1
View File
@@ -799,7 +799,7 @@ static inline struct uart_dev_s *up_mapirq(int irq)
#endif
default:
PANIC(OSERR_INTERNAL);
PANIC();
break;
}
return dev;
+6 -6
View File
@@ -164,7 +164,7 @@ static int kinetis_nmi(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! NMI received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -172,7 +172,7 @@ static int kinetis_busfault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Bus fault recived\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -180,7 +180,7 @@ static int kinetis_usagefault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Usage fault received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -188,7 +188,7 @@ static int kinetis_pendsv(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! PendSV received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -196,7 +196,7 @@ static int kinetis_dbgmonitor(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Debug Monitor receieved\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -204,7 +204,7 @@ static int kinetis_reserved(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Reserved interrupt\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
#endif
+2 -2
View File
@@ -782,7 +782,7 @@ static int up_interrupte(int irq, void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
DEBUGASSERT(priv);
@@ -871,7 +871,7 @@ static int up_interrupts(int irq, void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
DEBUGASSERT(priv);
+3 -3
View File
@@ -138,7 +138,7 @@ static int kl_nmi(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! NMI received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -146,7 +146,7 @@ static int kl_pendsv(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! PendSV received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -154,7 +154,7 @@ static int kl_reserved(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Reserved interrupt\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
#endif
+1 -1
View File
@@ -528,7 +528,7 @@ static int up_interrupts(int irq, void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
DEBUGASSERT(priv);
+6 -6
View File
@@ -146,7 +146,7 @@ static int lm_nmi(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! NMI received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -154,7 +154,7 @@ static int lm_busfault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Bus fault recived\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -162,7 +162,7 @@ static int lm_usagefault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Usage fault received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -170,7 +170,7 @@ static int lm_pendsv(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! PendSV received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -178,7 +178,7 @@ static int lm_dbgmonitor(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Debug Monitor receieved\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -186,7 +186,7 @@ static int lm_reserved(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Reserved interrupt\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
#endif
+1 -1
View File
@@ -962,7 +962,7 @@ static int up_interrupt(int irq, void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -364,7 +364,7 @@ static int i2c_interrupt(int irq, FAR void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
/* Reference UM10360 19.10.5 */
+6 -6
View File
@@ -145,7 +145,7 @@ static int lpc17_nmi(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! NMI received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -153,7 +153,7 @@ static int lpc17_busfault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Bus fault recived\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -161,7 +161,7 @@ static int lpc17_usagefault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Usage fault received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -169,7 +169,7 @@ static int lpc17_pendsv(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! PendSV received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -177,7 +177,7 @@ static int lpc17_dbgmonitor(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Debug Monitor receieved\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -185,7 +185,7 @@ static int lpc17_reserved(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Reserved interrupt\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
#endif
+1 -1
View File
@@ -1068,7 +1068,7 @@ static int up_interrupt(int irq, void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -114,7 +114,7 @@ static void lpc214x_decodeirq( uint32_t *regs)
#ifdef CONFIG_SUPPRESS_INTERRUPTS
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
/* Decode the interrupt. We have to do this by search for the lowest numbered
+1 -1
View File
@@ -468,7 +468,7 @@ static int up_interrupt(int irq, void *context)
}
else
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s*)dev->priv;
+1 -1
View File
@@ -113,7 +113,7 @@ static void lpc23xx_decodeirq(uint32_t *regs)
#ifdef CONFIG_SUPPRESS_INTERRUPTS
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
/* Check which IRQ fires */
+1 -1
View File
@@ -598,7 +598,7 @@ static int up_interrupt(int irq, void *context)
}
else
{
PANIC(OSERR_INTERNAL);
PANIC();
}
priv = (struct up_dev_s *)dev->priv;
+1 -1
View File
@@ -79,7 +79,7 @@ void up_decodeirq(uint32_t *regs)
#ifdef CONFIG_SUPPRESS_INTERRUPTS
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC(OSERR_ERREXCEPTION);
PANIC();
#else
int index;
int irq;
+1 -1
View File
@@ -370,7 +370,7 @@ static int i2c_interrupt(int irq, FAR void *context)
else
#endif
{
PANIC(OSERR_INTERNAL);
PANIC();
}
/* Reference UM10360 19.10.5 */
+6 -6
View File
@@ -147,7 +147,7 @@ static int lpc43_nmi(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! NMI received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -155,7 +155,7 @@ static int lpc43_busfault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Bus fault recived\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -163,7 +163,7 @@ static int lpc43_usagefault(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Usage fault received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -171,7 +171,7 @@ static int lpc43_pendsv(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! PendSV received\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -179,7 +179,7 @@ static int lpc43_dbgmonitor(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Debug Monitor receieved\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
@@ -187,7 +187,7 @@ static int lpc43_reserved(int irq, FAR void *context)
{
(void)irqsave();
dbg("PANIC!!! Reserved interrupt\n");
PANIC(OSERR_UNEXPECTEDISR);
PANIC();
return 0;
}
#endif

Some files were not shown because too many files have changed in this diff Show More