summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-04 23:02:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-04 23:02:00 +0000
commita086a5b65839065f33764678c541d3af4afb0568 (patch)
treeb432725a3d8fadeaa4e8b00c071284cdf0fe2fec /nuttx/include
parentf83c9b840d045664f99114a3c71bbdab5744367c (diff)
downloadpx4-nuttx-a086a5b65839065f33764678c541d3af4afb0568.tar.gz
px4-nuttx-a086a5b65839065f33764678c541d3af4afb0568.tar.bz2
px4-nuttx-a086a5b65839065f33764678c541d3af4afb0568.zip
Move core of fdopen() logic from lib/stdio to fs/
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3464 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/fs.h16
-rw-r--r--nuttx/include/nuttx/sched.h4
2 files changed, 11 insertions, 9 deletions
diff --git a/nuttx/include/nuttx/fs.h b/nuttx/include/nuttx/fs.h
index 02c40121e..462347510 100644
--- a/nuttx/include/nuttx/fs.h
+++ b/nuttx/include/nuttx/fs.h
@@ -346,13 +346,13 @@ EXTERN int files_addreflist(FAR struct filelist *list);
EXTERN int files_releaselist(FAR struct filelist *list);
EXTERN int files_dup(FAR struct file *filep1, FAR struct file *filep2);
-/* fs_filedup.c **************************************************************/
+/* fs_filedup.c *************************************************************/
/* Dupicate a file descriptor using any value greater than or equal to minfd */
EXTERN int file_dup(int fd, int minfd);
-/* fs_filedup2.c *************************************************************/
+/* fs_filedup2.c ************************************************************/
/* This alternative naming is used when dup could operate on both file and
* socket descritors to avoid drawing unused socket support into the link.
@@ -364,25 +364,23 @@ EXTERN int file_dup2(int fd1, int fd2);
# define file_dup2(fd1, fd2) dup2(fd1, fd2)
#endif
-/* fs_openblockdriver.c ******************************************************/
+/* fs_openblockdriver.c *****************************************************/
EXTERN int open_blockdriver(FAR const char *pathname, int mountflags,
FAR struct inode **ppinode);
-/* fs_closeblockdriver.c *****************************************************/
+/* fs_closeblockdriver.c ****************************************************/
EXTERN int close_blockdriver(FAR struct inode *inode);
#endif
-/* lib_fopen.c **************************************************************/
+/* fs_fdopen.c **************************************************************/
/* Used by the OS to clone stdin, stdout, stderr */
#if CONFIG_NFILE_STREAMS > 0
-EXTERN FAR struct file_struct *lib_fdopen(int fd,
- const char *mode,
- FAR struct filelist *flist,
- FAR struct streamlist *slist);
+typedef struct _TCB _TCB;
+EXTERN FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb);
#endif
/* lib_fflush.c *************************************************************/
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 70c8a746a..1b5d28f82 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -311,6 +311,10 @@ extern "C" {
#define EXTERN extern
#endif
+/* TCB helpers */
+
+EXTERN FAR _TCB *sched_self(void);
+
/* File system helpers */
#if CONFIG_NFILE_DESCRIPTORS > 0