From 329bf67f0c4b6beb77e5856c8038a3202909be58 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 15 Dec 2009 14:25:14 +0000 Subject: 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@2343 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/drivers/pipes/fifo.c | 7 ++----- nuttx/drivers/pipes/pipe.c | 6 +++--- nuttx/drivers/pipes/pipe_common.c | 14 ++++++++------ nuttx/drivers/pipes/pipe_common.h | 7 ++++--- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'nuttx/drivers/pipes') diff --git a/nuttx/drivers/pipes/fifo.c b/nuttx/drivers/pipes/fifo.c index bc9f629f5..9e663b4a8 100644 --- a/nuttx/drivers/pipes/fifo.c +++ b/nuttx/drivers/pipes/fifo.c @@ -33,10 +33,6 @@ * ****************************************************************************/ -/**************************************************************************** - * Compilation Switches - ****************************************************************************/ - /**************************************************************************** * Included Files ****************************************************************************/ @@ -44,6 +40,7 @@ #include #include +#include #include #include @@ -52,7 +49,7 @@ #if CONFIG_DEV_PIPE_SIZE > 0 /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/nuttx/drivers/pipes/pipe.c b/nuttx/drivers/pipes/pipe.c index 95049b354..541f3bda4 100644 --- a/nuttx/drivers/pipes/pipe.c +++ b/nuttx/drivers/pipes/pipe.c @@ -88,9 +88,9 @@ static const struct file_operations pipe_fops = #endif }; -static sem_t g_pipesem = { 1 }; -static uint32 g_pipeset = 0; -static uint32 g_pipecreated = 0; +static sem_t g_pipesem = { 1 }; +static uint32_t g_pipeset = 0; +static uint32_t g_pipecreated = 0; /**************************************************************************** * Private Functions diff --git a/nuttx/drivers/pipes/pipe_common.c b/nuttx/drivers/pipes/pipe_common.c index 60d028c00..e22678688 100644 --- a/nuttx/drivers/pipes/pipe_common.c +++ b/nuttx/drivers/pipes/pipe_common.c @@ -38,9 +38,11 @@ ****************************************************************************/ #include -#include +#include #include +#include +#include #include #include #include @@ -198,7 +200,7 @@ int pipecommon_open(FAR struct file *filep) if (dev->d_refs == 0) { - dev->d_buffer = (ubyte*)malloc(CONFIG_DEV_PIPE_SIZE); + dev->d_buffer = (uint8_t*)malloc(CONFIG_DEV_PIPE_SIZE); if (!dev->d_buffer) { (void)sem_post(&dev->d_bfsem); @@ -330,7 +332,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) struct inode *inode = filep->f_inode; struct pipe_dev_s *dev = inode->i_private; #ifdef CONFIG_DEV_PIPEDUMP - FAR ubyte *start = (ubyte*)buffer; + FAR uint8_t *start = (uint8_t*)buffer; #endif ssize_t nread = 0; int sval; @@ -434,7 +436,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t return -ENODEV; } #endif - pipe_dumpbuffer("To PIPE:", (ubyte*)buffer, len); + pipe_dumpbuffer("To PIPE:", (uint8_t*)buffer, len); /* At present, this method cannot be called from interrupt handlers. That is * because it calls sem_wait (via pipecommon_semtake below) and sem_wait cannot @@ -448,7 +450,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t * of taking semaphores so that pipes can be written from interupt handlers */ - DEBUGASSERT(up_interrupt_context() == FALSE) + DEBUGASSERT(up_interrupt_context() == false) /* Make sure that we have exclusive access to the device structure */ @@ -544,7 +546,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t #ifndef CONFIG_DISABLE_POLL int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds, - boolean setup) + bool setup) { FAR struct inode *inode = filep->f_inode; FAR struct pipe_dev_s *dev = inode->i_private; diff --git a/nuttx/drivers/pipes/pipe_common.h b/nuttx/drivers/pipes/pipe_common.h index cf0d92742..16bf285b5 100644 --- a/nuttx/drivers/pipes/pipe_common.h +++ b/nuttx/drivers/pipes/pipe_common.h @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/pipe/pipe_common.h * - * Copyright (C) 2008i-2009 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 @@ -44,6 +44,7 @@ #include #include +#include #include #ifndef CONFIG_DEV_PIPE_SIZE @@ -53,7 +54,7 @@ #if CONFIG_DEV_PIPE_SIZE > 0 /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /* Maximum number of threads than can be waiting for POLL events */ @@ -126,7 +127,7 @@ EXTERN ssize_t pipecommon_read(FAR struct file *, FAR char *, size_t); EXTERN ssize_t pipecommon_write(FAR struct file *, FAR const char *, size_t); #ifndef CONFIG_DISABLE_POLL EXTERN int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds, - boolean setup); + bool setup); #endif #undef EXTERN -- cgit v1.2.3