diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-07-27 14:58:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-07-27 14:58:36 +0000 |
commit | e836de52ab6423fe83da3a3b937308c5dd743990 (patch) | |
tree | 741f3b0023999c6c59b46d437e1d77b5a235aac7 /nuttx/drivers/pipe-common.h | |
parent | 2521b18e3dbb7c284e1e92450a868051dc7d2c6b (diff) | |
download | px4-nuttx-e836de52ab6423fe83da3a3b937308c5dd743990.tar.gz px4-nuttx-e836de52ab6423fe83da3a3b937308c5dd743990.tar.bz2 px4-nuttx-e836de52ab6423fe83da3a3b937308c5dd743990.zip |
fix pipe cleanup logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@786 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/pipe-common.h')
-rw-r--r-- | nuttx/drivers/pipe-common.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/nuttx/drivers/pipe-common.h b/nuttx/drivers/pipe-common.h index 9f0a9d046..12fd72222 100644 --- a/nuttx/drivers/pipe-common.h +++ b/nuttx/drivers/pipe-common.h @@ -70,7 +70,7 @@ typedef uint16 pipe_ndx_t; /* 16-bit index */ typedef ubyte pipe_ndx_t; /* 8-bit index */ #endif -struct pipe_state_s +struct pipe_dev_s { sem_t d_bfsem; /* Used to serialize access to d_buffer and indices */ sem_t d_rdsem; /* Empty buffer - Reader waits for data write */ @@ -80,12 +80,7 @@ struct pipe_state_s ubyte d_refs; /* References counts on pipe (limited to 255) */ ubyte d_nwriters; /* Number of reference counts for write access */ ubyte d_pipeno; /* Pipe minor number */ -}; - -struct pipe_dev_s -{ - struct pipe_state_s s; - ubyte d_buffer[CONFIG_DEV_PIPE_SIZE]; + ubyte *d_buffer; /* Buffer alloated when device opend */ }; /**************************************************************************** |