Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2356 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-12-16 14:52:56 +00:00
parent d8f7773edd
commit 6be18e43cf
23 changed files with 100 additions and 64 deletions

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -44,8 +44,6 @@
* Included Files
************************************************************/
#include <sys/types.h>
/************************************************************
* Definitions
************************************************************/

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,10 +38,14 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
#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

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -39,7 +39,8 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
@ -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);
}

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,10 +38,13 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
#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);

View File

@ -38,9 +38,13 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <nuttx/arch.h>
#include <nuttx/kmalloc.h>
#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 */

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,7 +38,10 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <nuttx/fs.h>
#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;
}

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -43,7 +43,6 @@
# include <zlib.h>
#else
# include <nuttx/config.h>
# include <sys/types.h>
# include <stdlib.h>
# include <debug.h>
# include <zlib.h>

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,10 +38,12 @@
****************************************************************************/
#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"

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,8 +38,8 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
@ -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 */

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -37,11 +37,14 @@
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <nuttx/config.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <assert.h>
#include <nuttx/init.h>
#include <nuttx/arch.h>
@ -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);

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,7 +38,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <time.h>
#include <nuttx/arch.h>
#include "up_internal.h"

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,10 +38,12 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <debug.h>
#include "up_internal.h"
/****************************************************************************

View File

@ -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 <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 <string.h>
#include <nuttx/arch.h>
#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;
}

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -40,6 +40,7 @@
* Included Files
**************************************************************************/
#include <sys/types.h>
#include <nuttx/irq.h>
/**************************************************************************

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,7 +38,8 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdbool.h>
#include <nuttx/arch.h>
#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;
}

View File

@ -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 <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"

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,9 +38,10 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdlib.h>
#include <nuttx/arch.h>
#include "up_internal.h"
/****************************************************************************

View File

@ -38,10 +38,14 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
#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

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -38,10 +38,12 @@
****************************************************************************/
#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"

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Based on code from uIP which also has a BSD-like license:

View File

@ -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 <spudmonkey@racsa.co.cr>
*
* Based on code from uIP which also has a BSD-like license:
@ -45,7 +45,9 @@
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <sched.h>
#include <nuttx/net.h>
@ -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);
}

View File

@ -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 <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 "clock_internal.h"
#include "os_internal.h"
#include "up_internal.h"