mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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
This commit is contained in:
@@ -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];
|
||||
};
|
||||
|
||||
+4
-5
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user