summaryrefslogtreecommitdiff
path: root/nuttx/sched/sched_setupstreams.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:30:31 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:30:31 +0000
commite135573acc348649e767ca67a1ec189fe4e0fcda (patch)
treeb34f7d2914cba8aeb9311c5bae3771af40054640 /nuttx/sched/sched_setupstreams.c
parentd76fa866ad009d65396acf1aa08fcffd3b4b041e (diff)
downloadpx4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.tar.gz
px4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.tar.bz2
px4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.zip
Fix STM32 F2/F4 SDIO clocking; Clean-up files in sched/ directory
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4940 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sched_setupstreams.c')
-rw-r--r--nuttx/sched/sched_setupstreams.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/nuttx/sched/sched_setupstreams.c b/nuttx/sched/sched_setupstreams.c
index 0706e1188..22895b047 100644
--- a/nuttx/sched/sched_setupstreams.c
+++ b/nuttx/sched/sched_setupstreams.c
@@ -46,7 +46,12 @@
#include <nuttx/net/net.h>
#include <nuttx/lib.h>
-#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0
+/* Make sure that there are file or socket descriptors in the system and
+ * that some number of streams have been configured.
+ */
+
+#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
+#if CONFIG_NFILE_STREAMS > 0
/****************************************************************************
* Private Functions
@@ -56,9 +61,18 @@
* Public Functions
****************************************************************************/
+/****************************************************************************
+ * Name: sched_setupstreams
+ *
+ * Description:
+ * Setup streams data structures that may be used for standard C buffered
+ * I/O with underlying socket or file desciptors
+ *
+ ****************************************************************************/
+
int sched_setupstreams(FAR _TCB *tcb)
{
- /* Allocate file strems for the TCB */
+ /* Allocate file streams for the TCB */
tcb->streams = lib_alloclist();
if (tcb->streams)
@@ -80,4 +94,5 @@ int sched_setupstreams(FAR _TCB *tcb)
return OK;
}
-#endif /* CONFIG_NFILE_STREAMS && CONFIG_NFILE_STREAMS */
+#endif /* CONFIG_NFILE_STREAMS > 0 */
+#endif /* CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0*/