mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
Fixes for Z16F compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@808 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|||||||
|
|
||||||
CSRCS =
|
CSRCS =
|
||||||
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||||
CSRCS += dev_null.c dev_zero.c pipe.c fifo.c pipe-common.c serial.c lowconsole.c can.c
|
CSRCS += dev_null.c dev_zero.c pipe.c fifo.c pipe_common.c serial.c lowconsole.c can.c
|
||||||
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
||||||
CSRCS += ramdisk.c
|
CSRCS += ramdisk.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@
|
|||||||
#include <nuttx/fs.h>
|
#include <nuttx/fs.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "pipe-common.h"
|
#include "pipe_common.h"
|
||||||
|
|
||||||
#if CONFIG_DEV_PIPE_SIZE > 0
|
#if CONFIG_DEV_PIPE_SIZE > 0
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -51,7 +51,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "pipe-common.h"
|
#include "pipe_common.h"
|
||||||
|
|
||||||
#if CONFIG_DEV_PIPE_SIZE > 0
|
#if CONFIG_DEV_PIPE_SIZE > 0
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ static int pipe_close(FAR struct file *filep)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
int pipe(int filedes[2])
|
int pipe(int filedes[2])
|
||||||
{
|
{
|
||||||
struct pipe_dev_s *dev;
|
struct pipe_dev_s *dev = NULL;
|
||||||
char devname[16];
|
char devname[16];
|
||||||
int pipeno;
|
int pipeno;
|
||||||
int err;
|
int err;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* drivers/pipe-common.c
|
* drivers/pipe_common.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <nuttx/fs.h>
|
#include <nuttx/fs.h>
|
||||||
|
|
||||||
#include "pipe-common.h"
|
#include "pipe_common.h"
|
||||||
|
|
||||||
#if CONFIG_DEV_PIPE_SIZE > 0
|
#if CONFIG_DEV_PIPE_SIZE > 0
|
||||||
|
|
||||||
@@ -83,6 +83,7 @@ static void pipecommon_semtake(sem_t *sem);
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_semtake
|
* Name: pipecommon_semtake
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void pipecommon_semtake(sem_t *sem)
|
static void pipecommon_semtake(sem_t *sem)
|
||||||
{
|
{
|
||||||
while (sem_wait(sem) != 0)
|
while (sem_wait(sem) != 0)
|
||||||
@@ -102,6 +103,7 @@ static void pipecommon_semtake(sem_t *sem)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_allocdev
|
* Name: pipecommon_allocdev
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
||||||
{
|
{
|
||||||
struct pipe_dev_s *dev;
|
struct pipe_dev_s *dev;
|
||||||
@@ -124,7 +126,8 @@ FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_freedev
|
* Name: pipecommon_freedev
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void pipecommon_freedev(FAR struct pipe_dev_s *dev)
|
|
||||||
|
void pipecommon_freedev(FAR struct pipe_dev_s *dev)
|
||||||
{
|
{
|
||||||
sem_destroy(&dev->d_bfsem);
|
sem_destroy(&dev->d_bfsem);
|
||||||
sem_destroy(&dev->d_rdsem);
|
sem_destroy(&dev->d_rdsem);
|
||||||
@@ -135,6 +138,7 @@ FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_open
|
* Name: pipecommon_open
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int pipecommon_open(FAR struct file *filep)
|
int pipecommon_open(FAR struct file *filep)
|
||||||
{
|
{
|
||||||
struct inode *inode = filep->f_inode;
|
struct inode *inode = filep->f_inode;
|
||||||
@@ -212,6 +216,7 @@ int pipecommon_open(FAR struct file *filep)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_close
|
* Name: pipecommon_close
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int pipecommon_close(FAR struct file *filep)
|
int pipecommon_close(FAR struct file *filep)
|
||||||
{
|
{
|
||||||
struct inode *inode = filep->f_inode;
|
struct inode *inode = filep->f_inode;
|
||||||
@@ -280,6 +285,7 @@ int pipecommon_close(FAR struct file *filep)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_read
|
* Name: pipecommon_read
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||||
{
|
{
|
||||||
struct inode *inode = filep->f_inode;
|
struct inode *inode = filep->f_inode;
|
||||||
@@ -362,6 +368,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: pipecommon_write
|
* Name: pipecommon_write
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t len)
|
ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t len)
|
||||||
{
|
{
|
||||||
struct inode *inode = filep->f_inode;
|
struct inode *inode = filep->f_inode;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* drivers/pipe-common.h
|
* drivers/pipe_common.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
Reference in New Issue
Block a user