summaryrefslogtreecommitdiff
path: root/nuttx/arch/z16/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/z16/src/common')
-rw-r--r--nuttx/arch/z16/src/common/up_assert.c8
-rw-r--r--nuttx/arch/z16/src/common/up_blocktask.c6
-rw-r--r--nuttx/arch/z16/src/common/up_copystate.c3
-rw-r--r--nuttx/arch/z16/src/common/up_createstack.c9
-rw-r--r--nuttx/arch/z16/src/common/up_doirq.c3
-rw-r--r--nuttx/arch/z16/src/common/up_exit.c3
-rw-r--r--nuttx/arch/z16/src/common/up_idle.c6
-rw-r--r--nuttx/arch/z16/src/common/up_initialize.c3
-rw-r--r--nuttx/arch/z16/src/common/up_initialstate.c12
-rw-r--r--nuttx/arch/z16/src/common/up_interruptcontext.c11
-rw-r--r--nuttx/arch/z16/src/common/up_registerdump.c6
-rw-r--r--nuttx/arch/z16/src/common/up_releasepending.c3
-rw-r--r--nuttx/arch/z16/src/common/up_releasestack.c5
-rw-r--r--nuttx/arch/z16/src/common/up_reprioritizertr.c13
-rw-r--r--nuttx/arch/z16/src/common/up_schedulesigaction.c14
-rw-r--r--nuttx/arch/z16/src/common/up_sigdeliver.c6
-rw-r--r--nuttx/arch/z16/src/common/up_stackdump.c3
-rw-r--r--nuttx/arch/z16/src/common/up_unblocktask.c3
-rw-r--r--nuttx/arch/z16/src/common/up_usestack.c8
19 files changed, 64 insertions, 61 deletions
diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c
index 713097293..d1bedb065 100644
--- a/nuttx/arch/z16/src/common/up_assert.c
+++ b/nuttx/arch/z16/src/common/up_assert.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_assert.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <debug.h>
@@ -109,7 +109,7 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
****************************************************************************/
#ifdef CONFIG_HAVE_FILENAME
-void up_assert(const ubyte *filename, int lineno)
+void up_assert(const uint8_t *filename, int lineno)
#else
void up_assert(void)
#endif
@@ -146,7 +146,7 @@ void up_assert(void)
****************************************************************************/
#ifdef CONFIG_HAVE_FILENAME
-void up_assert_code(const ubyte *filename, int lineno, int errorcode)
+void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
#else
void up_assert_code(int errorcode)
#endif
diff --git a/nuttx/arch/z16/src/common/up_blocktask.c b/nuttx/arch/z16/src/common/up_blocktask.c
index 806c91d41..015ebed3a 100644
--- a/nuttx/arch/z16/src/common/up_blocktask.c
+++ b/nuttx/arch/z16/src/common/up_blocktask.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_blocktask.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdbool.h>
#include <sched.h>
#include <debug.h>
@@ -96,7 +96,7 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
else
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- boolean switch_needed;
+ bool switch_needed;
/* dbg("Blocking TCB=%p\n", tcb); */
diff --git a/nuttx/arch/z16/src/common/up_copystate.c b/nuttx/arch/z16/src/common/up_copystate.c
index 5b8d83cc0..1a48536d7 100644
--- a/nuttx/arch/z16/src/common/up_copystate.c
+++ b/nuttx/arch/z16/src/common/up_copystate.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_copystate.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <arch/irq.h>
#include "os_internal.h"
diff --git a/nuttx/arch/z16/src/common/up_createstack.c b/nuttx/arch/z16/src/common/up_createstack.c
index 166ae25e1..a59c79c84 100644
--- a/nuttx/arch/z16/src/common/up_createstack.c
+++ b/nuttx/arch/z16/src/common/up_createstack.c
@@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
@@ -94,7 +95,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
if (!tcb->stack_alloc_ptr)
{
- tcb->stack_alloc_ptr = (uint32 *)kzmalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t*)kzmalloc(stack_size);
}
if (tcb->stack_alloc_ptr)
@@ -109,7 +110,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
* referenced as positive word offsets from sp.
*/
- top_of_stack = (uint32)tcb->stack_alloc_ptr + stack_size - 4;
+ top_of_stack = (uint32_t)tcb->stack_alloc_ptr + stack_size - 4;
/* The Arm7Tdmi stack must be aligned at word (4 byte)
* boundaries. If necessary top_of_stack must be rounded
@@ -117,11 +118,11 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
*/
top_of_stack &= ~3;
- size_of_stack = top_of_stack - (uint32)tcb->stack_alloc_ptr + 4;
+ size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
/* Save the adjusted stack values in the _TCB */
- tcb->adj_stack_ptr = (uint32*)top_of_stack;
+ tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
up_ledon(LED_STACKCREATED);
diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c
index f5f483f41..e7e43b24d 100644
--- a/nuttx/arch/z16/src/common/up_doirq.c
+++ b/nuttx/arch/z16/src/common/up_doirq.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_doirq.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <assert.h>
#include <nuttx/irq.h>
diff --git a/nuttx/arch/z16/src/common/up_exit.c b/nuttx/arch/z16/src/common/up_exit.c
index e86137ab2..512dcd747 100644
--- a/nuttx/arch/z16/src/common/up_exit.c
+++ b/nuttx/arch/z16/src/common/up_exit.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_exit.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <sched.h>
#include <debug.h>
diff --git a/nuttx/arch/z16/src/common/up_idle.c b/nuttx/arch/z16/src/common/up_idle.c
index 528bc5f6e..154e041bc 100644
--- a/nuttx/arch/z16/src/common/up_idle.c
+++ b/nuttx/arch/z16/src/common/up_idle.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_idle.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <nuttx/arch.h>
#include <arch/board/board.h>
@@ -55,7 +55,7 @@
****************************************************************************/
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
-static ubyte g_ledtoggle = 0;
+static uint8_t g_ledtoggle = 0;
#endif
/****************************************************************************
diff --git a/nuttx/arch/z16/src/common/up_initialize.c b/nuttx/arch/z16/src/common/up_initialize.c
index c7413e89a..2121f73d9 100644
--- a/nuttx/arch/z16/src/common/up_initialize.c
+++ b/nuttx/arch/z16/src/common/up_initialize.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_initialize.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <debug.h>
#include <nuttx/arch.h>
diff --git a/nuttx/arch/z16/src/common/up_initialstate.c b/nuttx/arch/z16/src/common/up_initialstate.c
index d41e303bd..2282e2735 100644
--- a/nuttx/arch/z16/src/common/up_initialstate.c
+++ b/nuttx/arch/z16/src/common/up_initialstate.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_initialstate.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <string.h>
#include <nuttx/arch.h>
@@ -78,14 +78,14 @@
void up_initial_state(_TCB *tcb)
{
- uint32 *reg32 = (uint32*)tcb->xcp.regs;
+ uint32 *reg32 = (uint32_t*)tcb->xcp.regs;
/* Initialize the initial exception register context structure */
memset(&tcb->xcp, 0, sizeof(struct xcptcontext));
#ifndef CONFIG_SUPPRESS_INTERRUPTS
- tcb->xcp.regs[REG_FLAGS] = (uint16)Z16F_CNTRL_FLAGS_IRQE; /* IRQE flag will enable interrupts */
+ tcb->xcp.regs[REG_FLAGS] = (uint16_t))Z16F_CNTRL_FLAGS_IRQE; /* IRQE flag will enable interrupts */
#endif
- reg32[REG_SP/2] = (uint32)tcb->adj_stack_ptr;
- reg32[REG_PC/2] = (uint32)tcb->start;
+ reg32[REG_SP/2] = (uint32_t)tcb->adj_stack_ptr;
+ reg32[REG_PC/2] = (uint32_t)tcb->start;
}
diff --git a/nuttx/arch/z16/src/common/up_interruptcontext.c b/nuttx/arch/z16/src/common/up_interruptcontext.c
index 2fcfc6d36..fe9c281f7 100644
--- a/nuttx/arch/z16/src/common/up_interruptcontext.c
+++ b/nuttx/arch/z16/src/common/up_interruptcontext.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_interruptcontext.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,9 +38,12 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
+#include <stdint.h>
+
#include <nuttx/arch.h>
#include <nuttx/irq.h>
+
#include "up_internal.h"
/****************************************************************************
@@ -58,11 +61,11 @@
/****************************************************************************
* Name: up_interrupt_context
*
- * Description: Return TRUE is we are currently executing in
+ * Description: Return true is we are currently executing in
* the interrupt handler context.
****************************************************************************/
-boolean up_interrupt_context(void)
+bool up_interrupt_context(void)
{
return current_regs != NULL;
}
diff --git a/nuttx/arch/z16/src/common/up_registerdump.c b/nuttx/arch/z16/src/common/up_registerdump.c
index b854f4882..63a875c56 100644
--- a/nuttx/arch/z16/src/common/up_registerdump.c
+++ b/nuttx/arch/z16/src/common/up_registerdump.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_registerdump.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <debug.h>
#include <nuttx/irq.h>
@@ -76,7 +76,7 @@
#ifdef CONFIG_ARCH_STACKDUMP
static void up_registerdump(void)
{
- FAR uint32 *regs32 = (FAR uint32*)current_regs;
+ FAR uint32 *regs32 = (FAR uint32_t*)current_regs;
lldbg("R0 :%08x R1 :%08x R2 :%08x R3 :%08x "
"R4 :%08x R5 :%08x R6 :%08x R7 :%08x\n"
regs32[REG_R0/2], regs32[REG_R1/2], regs32[REG_R2/2], regs32[REG_R3/2],
diff --git a/nuttx/arch/z16/src/common/up_releasepending.c b/nuttx/arch/z16/src/common/up_releasepending.c
index 0160dd047..a91d78503 100644
--- a/nuttx/arch/z16/src/common/up_releasepending.c
+++ b/nuttx/arch/z16/src/common/up_releasepending.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_releasepending.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <sched.h>
#include <debug.h>
diff --git a/nuttx/arch/z16/src/common/up_releasestack.c b/nuttx/arch/z16/src/common/up_releasestack.c
index e6fcfb731..6f96c0c30 100644
--- a/nuttx/arch/z16/src/common/up_releasestack.c
+++ b/nuttx/arch/z16/src/common/up_releasestack.c
@@ -1,7 +1,7 @@
/************************************************************
* common/up_releasestack.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,10 +38,11 @@
************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
+
#include "os_internal.h"
#include "up_internal.h"
diff --git a/nuttx/arch/z16/src/common/up_reprioritizertr.c b/nuttx/arch/z16/src/common/up_reprioritizertr.c
index f8fff390b..e0ddc364b 100644
--- a/nuttx/arch/z16/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/z16/src/common/up_reprioritizertr.c
@@ -39,7 +39,8 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
+#include <stdbool.h>
#include <sched.h>
#include <debug.h>
@@ -85,7 +86,7 @@
*
****************************************************************************/
-void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
+void up_reprioritize_rtr(FAR _TCB *tcb, uint8_t priority)
{
/* Verify that the caller is sane */
@@ -99,12 +100,12 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
else
{
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
- boolean switch_needed;
+ bool switch_needed;
slldbg("TCB=%p PRI=%d\n", tcb, priority);
/* Remove the tcb task from the ready-to-run list.
- * sched_removereadytorun will return TRUE if we just
+ * sched_removereadytorun will return true if we just
* remove the head of the ready to run list.
*/
@@ -112,10 +113,10 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
/* Setup up the new task priority */
- tcb->sched_priority = (ubyte)priority;
+ tcb->sched_priority = (uint8_t)priority;
/* Return the task to the specified blocked task list.
- * sched_addreadytorun will return TRUE if the task was
+ * sched_addreadytorun will return true if the task was
* added to the new list. We will need to perform a context
* switch only if the EXCLUSIVE or of the two calls is non-zero
* (i.e., one and only one the calls changes the head of the
diff --git a/nuttx/arch/z16/src/common/up_schedulesigaction.c b/nuttx/arch/z16/src/common/up_schedulesigaction.c
index 4a4b0bcc8..9ed9c4fb5 100644
--- a/nuttx/arch/z16/src/common/up_schedulesigaction.c
+++ b/nuttx/arch/z16/src/common/up_schedulesigaction.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_schedulesigaction.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
@@ -104,7 +104,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
{
/* Refuse to handle nested signal actions */
- dbg("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32)sigdeliver);
+ dbg("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32_t)sigdeliver);
if (!tcb->xcp.sigdeliver)
{
@@ -141,7 +141,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
else
{
- FAR uint32 *current_pc = (FAR uint32*)&current_regs[REG_PC];
+ FAR uint32 *current_pc = (FAR uint32_t*)&current_regs[REG_PC];
/* Save the return address and interrupt state. These will be
* restored by the signal trampoline after the signals have
@@ -156,7 +156,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* disabled
*/
- *current_pc = (uint32)up_sigdeliver;
+ *current_pc = (uint32_t)up_sigdeliver;
current_regs[REG_FLAGS] = 0;
/* And make sure that the saved context in the TCB is the
@@ -174,7 +174,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
else
{
- FAR uint32 *saved_pc = (FAR uint32*)&tcb->xcp.regs[REG_PC];
+ FAR uint32 *saved_pc = (FAR uint32_t*)&tcb->xcp.regs[REG_PC];
/* Save the return lr and cpsr and one scratch register
* These will be restored by the signal trampoline after
@@ -189,7 +189,7 @@ void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver)
* disabled
*/
- *saved_pc = (uint32)up_sigdeliver;
+ *saved_pc = (uint32_t)up_sigdeliver;
tcb->xcp.regs[REG_FLAGS] = 0;
}
diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c
index a8eecdda2..ae04fa54d 100644
--- a/nuttx/arch/z16/src/common/up_sigdeliver.c
+++ b/nuttx/arch/z16/src/common/up_sigdeliver.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_sigdeliver.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
@@ -83,7 +83,7 @@ void up_sigdeliver(void)
#ifndef CONFIG_DISABLE_SIGNALS
FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
chipreg_t regs[XCPTCONTEXT_REGS];
- FAR uint32 *regs32 = (FAR uint32*)regs;
+ FAR uint32 *regs32 = (FAR uint32_t*)regs;
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
diff --git a/nuttx/arch/z16/src/common/up_stackdump.c b/nuttx/arch/z16/src/common/up_stackdump.c
index 354f59a9d..8f63e2c59 100644
--- a/nuttx/arch/z16/src/common/up_stackdump.c
+++ b/nuttx/arch/z16/src/common/up_stackdump.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_stackdump.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <debug.h>
#include "chip/chip.h"
diff --git a/nuttx/arch/z16/src/common/up_unblocktask.c b/nuttx/arch/z16/src/common/up_unblocktask.c
index 56cb6bde2..3e4958ab5 100644
--- a/nuttx/arch/z16/src/common/up_unblocktask.c
+++ b/nuttx/arch/z16/src/common/up_unblocktask.c
@@ -1,7 +1,7 @@
/****************************************************************************
* common/up_unblocktask.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,6 @@
#include <nuttx/config.h>
-#include <sys/types.h>
#include <sched.h>
#include <debug.h>
diff --git a/nuttx/arch/z16/src/common/up_usestack.c b/nuttx/arch/z16/src/common/up_usestack.c
index c65c4e4b9..14a18ccb3 100644
--- a/nuttx/arch/z16/src/common/up_usestack.c
+++ b/nuttx/arch/z16/src/common/up_usestack.c
@@ -38,11 +38,15 @@
************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
+#include <stdint.h>
#include <sched.h>
#include <debug.h>
+
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
+
#include "up_internal.h"
/************************************************************
@@ -99,7 +103,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
* referenced as positive word offsets from sp.
*/
- top_of_stack = (uint32)tcb->stack_alloc_ptr + stack_size - 4;
+ top_of_stack = (uint32_t)tcb->stack_alloc_ptr + stack_size - 4;
/* The Arm7Tdmi stack must be aligned at word (4 byte)
* boundaries. If necessary top_of_stack must be rounded
@@ -107,7 +111,7 @@ int up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
*/
top_of_stack &= ~3;
- size_of_stack = top_of_stack - (uint32)tcb->stack_alloc_ptr + 4;
+ size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
/* Save the adjusted stack values in the _TCB */