Rename _TCB to struct tcb_s

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5610 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-02-04 18:46:28 +00:00
parent 5ea42ec239
commit bc69dc2c5a
170 changed files with 421 additions and 421 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
if (g_irqtos || ((FAR _TCB*)g_readytorun.head)->pid == 0)
if (g_irqtos || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -100,7 +100,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -124,7 +124,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
+4 -4
View File
@@ -83,7 +83,7 @@
*
************************************************************************/
void up_block_task(FAR _TCB *tcb, tstate_t task_state)
void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -94,7 +94,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
}
else
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
dbg("Blocking TCB=%p\n", tcb);
@@ -139,7 +139,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
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
@@ -160,7 +160,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+2 -2
View File
@@ -77,7 +77,7 @@
void _exit(int status)
{
FAR _TCB* tcb;
FAR struct tcb_s* tcb;
dbg("TCB=%p exitting\n", tcb);
@@ -95,7 +95,7 @@ void _exit(int status)
* head of the list.
*/
tcb = (FAR _TCB*)g_readytorun.head;
tcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", tcb);
/* Then switch contexts */
+1 -1
View File
@@ -68,7 +68,7 @@ volatile uint8_t g_irqtos;
* during the interrupt handling, these registers will be
* copied into the TCB again (NOTE: We could save a copy
* if the interrupt handling logic saved the registers
* directly into (_TCB*)g_readytorun.head->xcp.regs).
* directly into (struct tcb_s*)g_readytorun.head->xcp.regs).
*/
uint8_t g_irqregs[REGS_SIZE];
+1 -1
View File
@@ -74,7 +74,7 @@
*
************************************************************************/
void up_initial_state(FAR _TCB *tcb)
void up_initial_state(FAR struct tcb_s *tcb)
{
FAR uint8_t *frame = tcb->xcp.stack;
FAR uint8_t *regs = tcb->xcp.regs;
+1 -1
View File
@@ -79,7 +79,7 @@ extern volatile uint8_t g_irqtos;
* during the interrupt handling, these registers will be
* copied into the TCB again (NOTE: We could save a copy
* if the interrupt handling logic saved the registers
* directly into (_TCB*)g_readytorun.head->xcp.regs).
* directly into (struct tcb_s*)g_readytorun.head->xcp.regs).
*/
extern uint8_t g_irqregs[REGS_SIZE];
+3 -3
View File
@@ -76,7 +76,7 @@
void up_release_pending(void)
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("From TCB=%p\n", rtcb);
@@ -102,7 +102,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
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
@@ -124,7 +124,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+4 -4
View File
@@ -85,7 +85,7 @@
*
****************************************************************************/
void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -103,7 +103,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
}
else
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
bool switch_needed;
dbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -157,7 +157,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
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
@@ -178,7 +178,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+4 -4
View File
@@ -80,7 +80,7 @@
*
************************************************************************/
void up_unblock_task(FAR _TCB *tcb)
void up_unblock_task(FAR struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -91,7 +91,7 @@ void up_unblock_task(FAR _TCB *tcb)
}
else
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("Unblocking TCB=%p\n", tcb);
@@ -131,7 +131,7 @@ void up_unblock_task(FAR _TCB *tcb)
* of the g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
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
@@ -154,7 +154,7 @@ void up_unblock_task(FAR _TCB *tcb)
* g_readytorun task list.
*/
rtcb = (FAR _TCB*)g_readytorun.head;
rtcb = (FAR struct tcb_s*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+1 -1
View File
@@ -165,7 +165,7 @@ static bool g_pgwrap;
*
****************************************************************************/
int up_allocpage(FAR _TCB *tcb, FAR void **vpage)
int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
{
uintptr_t vaddr;
uintptr_t paddr;
+4 -4
View File
@@ -161,7 +161,7 @@ static inline void up_registerdump(void)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
@@ -257,7 +257,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -287,7 +287,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -309,7 +309,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_block_task(_TCB *tcb, tstate_t task_state)
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -156,7 +156,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
+1 -1
View File
@@ -97,7 +97,7 @@
*
****************************************************************************/
bool up_checkmapping(FAR _TCB *tcb)
bool up_checkmapping(FAR struct tcb_s *tcb)
{
uintptr_t vaddr;
uint32_t *pte;
+2 -2
View File
@@ -102,9 +102,9 @@
#ifdef CONFIG_PAGING
void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
{
FAR _TCB *tcb = (FAR _TCB *)g_readytorun.head;
FAR struct tcb_s *tcb = (FAR struct tcb_s *)g_readytorun.head;
#ifdef CONFIG_PAGING
uint32_t *savestate;
uint32_t *savestate;
/* Save the saved processor context in current_regs where it can be accessed
* for register dumps and possibly context switching.
+1 -1
View File
@@ -78,7 +78,7 @@
*
****************************************************************************/
void up_initial_state(_TCB *tcb)
void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
uint32_t cpsr;
+1 -1
View File
@@ -121,7 +121,7 @@ void up_prefetchabort(uint32_t *regs)
* prefetch and data aborts.
*/
FAR _TCB *tcb = (FAR _TCB *)g_readytorun.head;
FAR struct tcb_s *tcb = (FAR struct tcb_s *)g_readytorun.head;
tcb->xcp.far = regs[REG_R15];
/* Call pg_miss() to schedule the page fill. A consequences of this
+3 -3
View File
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -121,7 +121,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -175,7 +175,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
+2 -2
View File
@@ -101,7 +101,7 @@
*
****************************************************************************/
void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
if (tcb == (_TCB*)g_readytorun.head)
if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
+1 -1
View File
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
+4 -4
View File
@@ -79,7 +79,7 @@
*
****************************************************************************/
void up_unblock_task(_TCB *tcb)
void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -148,7 +148,7 @@ void up_unblock_task(_TCB *tcb)
* g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
+5 -5
View File
@@ -167,8 +167,8 @@ static inline void up_registerdump(void)
#ifdef CONFIG_ARCH_STACKDUMP
static void up_dumpstate(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
uint32_t sp = up_getsp();
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t sp = up_getsp();
uint32_t ustackbase;
uint32_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -272,7 +272,7 @@ static void _up_assert(int errorcode)
{
/* Are we in an interrupt handler or the idle task? */
if (current_regs || ((_TCB*)g_readytorun.head)->pid == 0)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
for(;;)
@@ -302,7 +302,7 @@ static void _up_assert(int errorcode)
void up_assert(const uint8_t *filename, int lineno)
{
#ifdef CONFIG_PRINT_TASKNAME
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
@@ -324,7 +324,7 @@ void up_assert(const uint8_t *filename, int lineno)
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
{
#ifdef CONFIG_PRINT_TASKNAME
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
up_ledon(LED_ASSERTION);
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_block_task(_TCB *tcb, tstate_t task_state)
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+1 -1
View File
@@ -81,7 +81,7 @@
*
****************************************************************************/
void up_initial_state(_TCB *tcb)
void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
+3 -3
View File
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -100,7 +100,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -116,7 +116,7 @@ void up_release_pending(void)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -157,7 +157,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -173,7 +173,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+2 -2
View File
@@ -101,7 +101,7 @@
*
****************************************************************************/
void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
if (tcb == (_TCB*)g_readytorun.head)
if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
+1 -1
View File
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
+3 -3
View File
@@ -109,9 +109,9 @@
#ifdef CONFIG_NUTTX_KERNEL
static inline void dispatch_syscall(uint32_t *regs)
{
uint32_t cmd = regs[REG_R0];
FAR _TCB *rtcb = sched_self();
uintptr_t ret = (uintptr_t)ERROR;
uint32_t cmd = regs[REG_R0];
FAR struct tcb_s *rtcb = sched_self();
uintptr_t ret = (uintptr_t)ERROR;
/* Verify the the SYS call number is within range */
+4 -4
View File
@@ -79,7 +79,7 @@
*
****************************************************************************/
void up_unblock_task(_TCB *tcb)
void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -143,7 +143,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+3 -3
View File
@@ -78,7 +78,7 @@
*
****************************************************************************/
size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_tcbstack(FAR struct tcb_s *tcb)
{
FAR uint32_t *ptr;
size_t mark;
@@ -136,12 +136,12 @@ size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_stack(void)
{
return up_check_tcbstack((FAR _TCB*)g_readytorun.head);
return up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
size_t up_check_stack_remain(void)
{
return ((FAR _TCB*)g_readytorun.head)->adj_stack_size - up_check_tcbstack((FAR _TCB*)g_readytorun.head);
return ((FAR struct tcb_s*)g_readytorun.head)->adj_stack_size - up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
#endif /* CONFIG_DEBUG && CONFIG_DEBUG_STACK */
+2 -2
View File
@@ -128,7 +128,7 @@ static void *memset32(void *s, uint32_t c, size_t n)
* must be allocated.
****************************************************************************/
int up_create_stack(_TCB *tcb, size_t stack_size)
int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -174,7 +174,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
/* Save the adjusted stack values in the _TCB */
/* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
+3 -3
View File
@@ -73,7 +73,7 @@
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
void _exit(int status)
{
_TCB* tcb;
struct tcb_s* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -159,7 +159,7 @@ void _exit(int status)
* head of the list.
*/
tcb = (_TCB*)g_readytorun.head;
tcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
+2 -2
View File
@@ -410,8 +410,8 @@ extern void up_rnginitialize(void);
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
extern size_t up_check_stack(void);
extern size_t up_check_tcbstack(FAR _TCB);
extern size_t up_check_tcbstack_remain(FAR _TCB);
extern size_t up_check_tcbstack(FAR struct tcb_s);
extern size_t up_check_tcbstack_remain(FAR struct tcb_s);
#endif
#endif /* __ASSEMBLY__ */
+1 -1
View File
@@ -67,7 +67,7 @@
*
****************************************************************************/
void up_release_stack(_TCB *dtcb)
void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
+2 -2
View File
@@ -109,7 +109,7 @@
*
****************************************************************************/
int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
size_t size_of_stack;
@@ -146,7 +146,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
/* Save the adjusted stack values in the _TCB */
/* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
+2 -2
View File
@@ -126,8 +126,8 @@
pid_t up_vfork(const struct vfork_s *context)
{
_TCB *parent = (FAR _TCB *)g_readytorun.head;
_TCB *child;
struct tcb_s *parent = (FAR struct tcb_s *)g_readytorun.head;
struct tcb_s *child;
size_t stacksize;
uint32_t newsp;
uint32_t newfp;
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_block_task(_TCB *tcb, tstate_t task_state)
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+2 -2
View File
@@ -78,7 +78,7 @@
*
****************************************************************************/
size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_tcbstack(FAR struct tcb_s *tcb)
{
FAR uint8_t *ptr;
size_t mark;
@@ -135,7 +135,7 @@ size_t up_check_tcbstack(FAR _TCB *tcb)
size_t up_check_stack(void)
{
return up_check_tcbstack((FAR _TCB*)g_readytorun.head);
return up_check_tcbstack((FAR struct tcb_s*)g_readytorun.head);
}
#endif /* CONFIG_DEBUG && CONFIG_DEBUG_STACK */
+2 -2
View File
@@ -87,7 +87,7 @@
*
****************************************************************************/
int up_create_stack(_TCB *tcb, size_t stack_size)
int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
/* Is there already a stack allocated of a different size? */
@@ -137,7 +137,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack = (size_t)tcb->stack_alloc_ptr + stack_size - 1;
/* Save the adjusted stack values in the _TCB */
/* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = stack_size;
+2 -2
View File
@@ -168,8 +168,8 @@ static inline void up_registerdump(void)
void up_dumpstate(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
uint16_t sp = up_getsp();
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint16_t sp = up_getsp();
uint16_t ustackbase;
uint16_t ustacksize;
#if CONFIG_ARCH_INTERRUPTSTACK > 0
+1 -1
View File
@@ -79,7 +79,7 @@
*
****************************************************************************/
void up_initial_state(_TCB *tcb)
void up_initial_state(struct tcb_s *tcb)
{
struct xcptcontext *xcp = &tcb->xcp;
+3 -3
View File
@@ -75,7 +75,7 @@
void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("From TCB=%p\n", rtcb);
@@ -101,7 +101,7 @@ void up_release_pending(void)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -117,7 +117,7 @@ void up_release_pending(void)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -102,7 +102,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
@@ -156,7 +156,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
slldbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
@@ -172,7 +172,7 @@ void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+2 -2
View File
@@ -101,7 +101,7 @@
*
****************************************************************************/
void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
@@ -121,7 +121,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
sdbg("rtcb=0x%p current_regs=0x%p\n", g_readytorun.head, current_regs);
if (tcb == (_TCB*)g_readytorun.head)
if (tcb == (struct tcb_s*)g_readytorun.head)
{
/* CASE 1: We are not in an interrupt handler and
* a task is signalling itself for some reason.
+1 -1
View File
@@ -81,7 +81,7 @@
void up_sigdeliver(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
uint8_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
+4 -4
View File
@@ -79,7 +79,7 @@
*
****************************************************************************/
void up_unblock_task(_TCB *tcb)
void up_unblock_task(struct tcb_s *tcb)
{
/* Verify that the context switch can be performed */
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
/* Remove the task from the blocked task list */
@@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -143,7 +143,7 @@ void up_unblock_task(_TCB *tcb)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+2 -2
View File
@@ -82,7 +82,7 @@
*
****************************************************************************/
int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
size_t top_of_stack;
@@ -115,7 +115,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
top_of_stack = (size_t)tcb->stack_alloc_ptr + stack_size - 1;
/* Save the adjusted stack values in the _TCB */
/* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = stack_size;
+4 -4
View File
@@ -84,7 +84,7 @@
*
****************************************************************************/
void up_block_task(_TCB *tcb, tstate_t task_state)
void up_block_task(struct tcb_s *tcb, tstate_t task_state)
{
/* Verify that the context switch can be performed */
@@ -95,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
}
else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
bool switch_needed;
/* Remove the tcb task from the ready-to-run list. If we
@@ -138,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* of the g_readytorun task list.
*/
rtcb = (_TCB*)g_readytorun.head;
rtcb = (struct tcb_s*)g_readytorun.head;
/* Then switch contexts */
@@ -153,7 +153,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
* ready to run list.
*/
_TCB *nexttcb = (_TCB*)g_readytorun.head;
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
+2 -2
View File
@@ -86,7 +86,7 @@
*
****************************************************************************/
int up_create_stack(_TCB *tcb, size_t stack_size)
int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -124,7 +124,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
top_of_stack &= ~3;
size_of_stack = top_of_stack - (size_t)tcb->stack_alloc_ptr + 4;
/* Save the adjusted stack values in the _TCB */
/* Save the adjusted stack values in the struct tcb_s */
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = size_of_stack;

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