diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-26 22:25:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-26 22:25:21 +0000 |
commit | 75f185244fbd0892fdb26443eda666ce21c417ec (patch) | |
tree | 7b706cce24489ea8e025a9802d3daf3078428e19 /nuttx/fs/fs_fdopen.c | |
parent | 801ce1b6a68a593f0aef2d059d9279b0d0824e54 (diff) | |
download | px4-nuttx-75f185244fbd0892fdb26443eda666ce21c417ec.tar.gz px4-nuttx-75f185244fbd0892fdb26443eda666ce21c417ec.tar.bz2 px4-nuttx-75f185244fbd0892fdb26443eda666ce21c417ec.zip |
Move stream data from TCB to task group structure.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5569 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_fdopen.c')
-rw-r--r-- | nuttx/fs/fs_fdopen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c index 629083c77..d8a370482 100644 --- a/nuttx/fs/fs_fdopen.c +++ b/nuttx/fs/fs_fdopen.c @@ -144,6 +144,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) { tcb = sched_self(); } + DEBUGASSERT(tcb && tcb->group); /* Verify that this is a valid file/socket descriptor and that the * requested access can be support. @@ -191,9 +192,9 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) /* Get the stream list from the TCB */ - slist = tcb->streams; + slist = &tcb->group->tg_streamlist; - /* Find an unallocated FILE structure in the stream list */ + /* Find an unallocated FILE structure in the stream list */ ret = sem_wait(&slist->sl_sem); if (ret != OK) |