diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index f866da50dc..312154b785 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -1,7 +1,7 @@ /************************************************************ * irq.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,8 +44,6 @@ * Included Files ************************************************************/ -#include - /************************************************************ * Definitions ************************************************************/ diff --git a/arch/sim/src/up_allocateheap.c b/arch/sim/src/up_allocateheap.c index 86efe7d9d0..9278faf272 100644 --- a/arch/sim/src/up_allocateheap.c +++ b/arch/sim/src/up_allocateheap.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_allocateheap.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,14 @@ ****************************************************************************/ #include + #include +#include #include #include + #include + #include "os_internal.h" #include "up_internal.h" @@ -53,7 +57,7 @@ * Private Data ****************************************************************************/ -static ubyte sim_heap[SIM_HEAP_SIZE]; +static uint8_t sim_heap[SIM_HEAP_SIZE]; /**************************************************************************** * Private Functions diff --git a/arch/sim/src/up_blockdevice.c b/arch/sim/src/up_blockdevice.c index d91d121ace..f697b36cbb 100644 --- a/arch/sim/src/up_blockdevice.c +++ b/arch/sim/src/up_blockdevice.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_blockdevice.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,8 @@ #include -#include +#include +#include #include #include @@ -83,5 +84,5 @@ void up_registerblockdevice(void) { - ramdisk_register(0, (ubyte*)up_deviceimage(), NSECTORS, LOGICAL_SECTOR_SIZE, TRUE); + ramdisk_register(0, (uint8_t*)up_deviceimage(), NSECTORS, LOGICAL_SECTOR_SIZE, true); } diff --git a/arch/sim/src/up_blocktask.c b/arch/sim/src/up_blocktask.c index b297f1a8df..cfa9adb59e 100644 --- a/arch/sim/src/up_blocktask.c +++ b/arch/sim/src/up_blocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_blocktask.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,13 @@ ****************************************************************************/ #include -#include + +#include #include #include + #include + #include "os_internal.h" #include "up_internal.h" @@ -92,7 +95,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state) else { _TCB *rtcb = (_TCB*)g_readytorun.head; - boolean switch_needed; + bool switch_needed; sdbg("Blocking TCB=%p\n", tcb); diff --git a/arch/sim/src/up_createstack.c b/arch/sim/src/up_createstack.c index 4d31701a15..76f13f1e79 100644 --- a/arch/sim/src/up_createstack.c +++ b/arch/sim/src/up_createstack.c @@ -38,9 +38,13 @@ ****************************************************************************/ #include + #include +#include + #include #include + #include "up_internal.h" /**************************************************************************** @@ -92,7 +96,7 @@ int up_create_stack(_TCB *tcb, size_t stack_size) /* Allocate the memory for the stack */ - uint32 *stack_alloc_ptr = (uint32*)kmalloc(adj_stack_size); + uint32 *stack_alloc_ptr = (uint32_t*)kmalloc(adj_stack_size); if (stack_alloc_ptr) { /* This is the address of the last word in the allocation */ diff --git a/arch/sim/src/up_devconsole.c b/arch/sim/src/up_devconsole.c index 4ce89bce12..afc0c0481f 100644 --- a/arch/sim/src/up_devconsole.c +++ b/arch/sim/src/up_devconsole.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_devconsole.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,10 @@ ****************************************************************************/ #include + #include +#include + #include #include "up_internal.h" @@ -55,7 +58,7 @@ static ssize_t devconsole_read(struct file *, char *, size_t); static ssize_t devconsole_write(struct file *, const char *, size_t); #ifndef CONFIG_DISABLE_POLL static int devconsole_poll(FAR struct file *filep, FAR struct pollfd *fds, - boolean setup); + bool setup); #endif /**************************************************************************** @@ -87,7 +90,7 @@ static ssize_t devconsole_write(struct file *filp, const char *buffer, size_t le #ifndef CONFIG_DISABLE_POLL static int devconsole_poll(FAR struct file *filep, FAR struct pollfd *fds, - boolean setup) + bool setup) { return OK; } diff --git a/arch/sim/src/up_deviceimage.c b/arch/sim/src/up_deviceimage.c index ac728c7f5b..fd45816ca1 100644 --- a/arch/sim/src/up_deviceimage.c +++ b/arch/sim/src/up_deviceimage.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_deviceimage.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,6 @@ # include #else # include -# include # include # include # include diff --git a/arch/sim/src/up_exit.c b/arch/sim/src/up_exit.c index 4a829e3cc3..d42ab94dd4 100644 --- a/arch/sim/src/up_exit.c +++ b/arch/sim/src/up_exit.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_exit.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,12 @@ ****************************************************************************/ #include -#include + #include #include + #include + #include "os_internal.h" #include "up_internal.h" diff --git a/arch/sim/src/up_framebuffer.c b/arch/sim/src/up_framebuffer.c index c7c9ee216b..d71a5e9e93 100644 --- a/arch/sim/src/up_framebuffer.c +++ b/arch/sim/src/up_framebuffer.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sim/src/up_framebuffer.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,8 +38,8 @@ ****************************************************************************/ #include -#include +#include #include #include #include @@ -135,7 +135,7 @@ extern int up_x11cmap(unsigned short first, unsigned short len, /* The simulated framebuffer memory */ #ifndef CONFIG_SIM_X11FB -static ubyte g_fb[FB_SIZE]; +static uint8_t g_fb[FB_SIZE]; #endif /* This structure describes the simulated video controller */ diff --git a/arch/sim/src/up_head.c b/arch/sim/src/up_head.c index 4f054211f4..e1d8c943ba 100644 --- a/arch/sim/src/up_head.c +++ b/arch/sim/src/up_head.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_head.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,11 +37,14 @@ * Included Files ****************************************************************************/ -#include +#include + +#include #include #include #include #include + #include #include @@ -64,13 +67,13 @@ int main(int argc, char **argv, char **envp) return 0; } -void up_assert(const ubyte *filename, int line) +void up_assert(const uint8_t *filename, int line) { fprintf(stderr, "Assertion failed at file:%s line: %d\n", filename, line); longjmp(sim_abort, 1); } -void up_assert_code(const ubyte *filename, int line, int code) +void up_assert_code(const uint8_t *filename, int line, int code) { fprintf(stderr, "Assertion failed at file:%s line: %d error code: %d\n", filename, line, code); longjmp(sim_abort, 1); diff --git a/arch/sim/src/up_idle.c b/arch/sim/src/up_idle.c index e830687134..686be307a9 100644 --- a/arch/sim/src/up_idle.c +++ b/arch/sim/src/up_idle.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_idle.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#include + #include #include #include "up_internal.h" diff --git a/arch/sim/src/up_initialize.c b/arch/sim/src/up_initialize.c index cd13ab37e5..eeea2abed4 100644 --- a/arch/sim/src/up_initialize.c +++ b/arch/sim/src/up_initialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_initialize.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,12 @@ ****************************************************************************/ #include -#include + +#include + #include #include -#include + #include "up_internal.h" /**************************************************************************** diff --git a/arch/sim/src/up_initialstate.c b/arch/sim/src/up_initialstate.c index 6a17863f73..6c959589fe 100644 --- a/arch/sim/src/up_initialstate.c +++ b/arch/sim/src/up_initialstate.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_initialstate.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,9 +38,12 @@ ****************************************************************************/ #include -#include + +#include #include + #include + #include "up_internal.h" /**************************************************************************** @@ -76,6 +79,6 @@ void up_initial_state(_TCB *tcb) { memset(&tcb->xcp, 0, sizeof(struct xcptcontext)); - tcb->xcp.regs[JB_SP] = (uint32)tcb->adj_stack_ptr; - tcb->xcp.regs[JB_PC] = (uint32)tcb->start; + tcb->xcp.regs[JB_SP] = (uint32_t)tcb->adj_stack_ptr; + tcb->xcp.regs[JB_PC] = (uint32_t)tcb->start; } diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 250bf0e06e..1b90c38091 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -1,7 +1,7 @@ /************************************************************************** * up_internal.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,7 @@ * Included Files **************************************************************************/ +#include #include /************************************************************************** diff --git a/arch/sim/src/up_interruptcontext.c b/arch/sim/src/up_interruptcontext.c index c9f32c5b84..8c211fc477 100644 --- a/arch/sim/src/up_interruptcontext.c +++ b/arch/sim/src/up_interruptcontext.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_interruptcontext.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,8 @@ ****************************************************************************/ #include -#include + +#include #include #include "up_internal.h" @@ -62,13 +63,14 @@ * Name: up_interrupt_context * * Description: - * Return TRUE is we are currently executing in - * the interrupt handler context. + * Return true is we are currently executing in the interrupt handler + * context. + * ****************************************************************************/ -boolean up_interrupt_context(void) +bool up_interrupt_context(void) { /* The simulation is never in the interrupt state */ - return FALSE; + return false; } diff --git a/arch/sim/src/up_releasepending.c b/arch/sim/src/up_releasepending.c index 14601289dd..a5152ee86c 100644 --- a/arch/sim/src/up_releasepending.c +++ b/arch/sim/src/up_releasepending.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_releasepending.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,11 @@ ****************************************************************************/ #include -#include + #include #include #include + #include "os_internal.h" #include "up_internal.h" diff --git a/arch/sim/src/up_releasestack.c b/arch/sim/src/up_releasestack.c index 6c9cd47521..745345c1aa 100644 --- a/arch/sim/src/up_releasestack.c +++ b/arch/sim/src/up_releasestack.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_releasestack.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,9 +38,10 @@ ****************************************************************************/ #include -#include + #include #include + #include "up_internal.h" /**************************************************************************** diff --git a/arch/sim/src/up_reprioritizertr.c b/arch/sim/src/up_reprioritizertr.c index 8d6f436e60..a11bada6df 100644 --- a/arch/sim/src/up_reprioritizertr.c +++ b/arch/sim/src/up_reprioritizertr.c @@ -38,10 +38,14 @@ ****************************************************************************/ #include -#include + +#include +#include #include #include + #include + #include "os_internal.h" #include "up_internal.h" @@ -81,7 +85,7 @@ * ****************************************************************************/ -void up_reprioritize_rtr(_TCB *tcb, ubyte priority) +void up_reprioritize_rtr(_TCB *tcb, uint8_t priority) { /* Verify that the caller is sane */ @@ -95,12 +99,12 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) else { _TCB *rtcb = (_TCB*)g_readytorun.head; - boolean switch_needed; + bool switch_needed; sdbg("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. */ @@ -108,10 +112,10 @@ void up_reprioritize_rtr(_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/arch/sim/src/up_schedulesigaction.c b/arch/sim/src/up_schedulesigaction.c index 372458a434..b22aa5252f 100644 --- a/arch/sim/src/up_schedulesigaction.c +++ b/arch/sim/src/up_schedulesigaction.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_schedulesigaction.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,12 @@ ****************************************************************************/ #include -#include + #include #include + #include + #include "os_internal.h" #include "up_internal.h" diff --git a/arch/sim/src/up_stdio.c b/arch/sim/src/up_stdio.c index 543407b991..7a014d4d88 100644 --- a/arch/sim/src/up_stdio.c +++ b/arch/sim/src/up_stdio.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_stdio.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/arch/sim/src/up_tapdev.c b/arch/sim/src/up_tapdev.c index 0867117509..2c9d5c6466 100644 --- a/arch/sim/src/up_tapdev.c +++ b/arch/sim/src/up_tapdev.c @@ -2,7 +2,7 @@ /**************************************************************************** * up_tapdev.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: diff --git a/arch/sim/src/up_uipdriver.c b/arch/sim/src/up_uipdriver.c index 24f8f204ec..3c2a2d5782 100644 --- a/arch/sim/src/up_uipdriver.c +++ b/arch/sim/src/up_uipdriver.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_uipdriver.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: @@ -45,7 +45,9 @@ ****************************************************************************/ #include -#include + +#include +#include #include #include #include @@ -69,8 +71,8 @@ struct timer { - uint32 interval; - uint32 start; + uint32_t interval; + uint32_t start; }; /**************************************************************************** @@ -94,7 +96,7 @@ static void timer_set(struct timer *t, unsigned int interval) t->start = up_getwalltime(); } -static boolean timer_expired( struct timer *t ) +static bool timer_expired( struct timer *t ) { return (up_getwalltime() - t->start) >= t->interval; } @@ -107,7 +109,7 @@ void timer_reset(struct timer *t) #ifdef CONFIG_NET_PROMISCUOUS # define up_comparemac(a,b) (0) #else -static inline int up_comparemac(uint8 *paddr1, struct ether_addr *paddr2) +static inline int up_comparemac(uint8_t *paddr1, struct ether_addr *paddr2) { return memcmp(paddr1, paddr2->ether_addr_octet, ETHER_ADDR_LEN); } diff --git a/arch/sim/src/up_unblocktask.c b/arch/sim/src/up_unblocktask.c index f13f7fb0f3..684b7fb0bf 100644 --- a/arch/sim/src/up_unblocktask.c +++ b/arch/sim/src/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * up_unblocktask.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,11 @@ ****************************************************************************/ #include -#include + #include #include #include + #include "clock_internal.h" #include "os_internal.h" #include "up_internal.h"