aboutsummaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-26 22:25:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-26 22:25:21 +0000
commitb82c36961aa730fc39a9fc8eac17e2518128cb67 (patch)
tree7b706cce24489ea8e025a9802d3daf3078428e19 /nuttx/include
parent3bec164b3ae1cd7f9b5dcec532e7d073be96d45d (diff)
downloadpx4-firmware-b82c36961aa730fc39a9fc8eac17e2518128cb67.tar.gz
px4-firmware-b82c36961aa730fc39a9fc8eac17e2518128cb67.tar.bz2
px4-firmware-b82c36961aa730fc39a9fc8eac17e2518128cb67.zip
Move stream data from TCB to task group structure.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5569 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/fs/fs.h1
-rw-r--r--nuttx/include/nuttx/lib.h9
-rw-r--r--nuttx/include/nuttx/sched.h13
3 files changed, 10 insertions, 13 deletions
diff --git a/nuttx/include/nuttx/fs/fs.h b/nuttx/include/nuttx/fs/fs.h
index 02855460c..93ca2a334 100644
--- a/nuttx/include/nuttx/fs/fs.h
+++ b/nuttx/include/nuttx/fs/fs.h
@@ -293,7 +293,6 @@ struct file_struct
struct streamlist
{
- int sl_crefs; /* Reference count */
sem_t sl_sem; /* For thread safety */
struct file_struct sl_streams[CONFIG_NFILE_STREAMS];
};
diff --git a/nuttx/include/nuttx/lib.h b/nuttx/include/nuttx/lib.h
index 220af2030..3bc581e18 100644
--- a/nuttx/include/nuttx/lib.h
+++ b/nuttx/include/nuttx/lib.h
@@ -2,7 +2,7 @@
* include/nuttx/lib.h
* Non-standard, internal APIs available in lib/.
*
- * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -67,11 +67,10 @@ extern "C" {
/* Functions contained in lib_init.c ****************************************/
-EXTERN void weak_function lib_initialize(void);
+void weak_function lib_initialize(void);
#if CONFIG_NFILE_STREAMS > 0
-EXTERN FAR struct streamlist *lib_alloclist(void);
-EXTERN void lib_addreflist(FAR struct streamlist *list);
-EXTERN void lib_releaselist(FAR struct streamlist *list);
+void lib_streaminit(FAR struct streamlist *list);
+void lib_releaselist(FAR struct streamlist *list);
#endif
#undef EXTERN
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 1580a80d3..a084d50ba 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -81,6 +81,8 @@
# define HAVE_TASK_GROUP 1
# elif CONFIG_NFILE_DESCRIPTORS > 0
# define HAVE_TASK_GROUP 1
+# elif CONFIG_NFILE_STREAMS > 0
+# define HAVE_TASK_GROUP 1
# endif
#endif
@@ -303,7 +305,10 @@ struct task_group_s
#endif
/* FILE streams ***************************************************************/
- /* Not yet (see streamlist) */
+
+#if CONFIG_NFILE_STREAMS > 0
+ struct streamlist tg_streamlist; /* Holds C buffered I/O info */
+#endif /* CONFIG_NFILE_STREAMS */
/* Sockets ********************************************************************/
/* Not yet (see struct socketlist) */
@@ -445,12 +450,6 @@ struct _TCB
int pterrno; /* Current per-thread errno */
- /* File system support ********************************************************/
-
-#if CONFIG_NFILE_STREAMS > 0
- FAR struct streamlist *streams; /* Holds C buffered I/O info */
-#endif
-
/* Network socket *************************************************************/
#if CONFIG_NSOCKET_DESCRIPTORS > 0