forked from nuttx/nuttx-update
remove fl_crefs
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
de5151c64b
commit
98ce36cdc7
3 changed files with 0 additions and 47 deletions
|
@ -379,7 +379,6 @@ void files_initlist(FAR struct filelist *list)
|
|||
*/
|
||||
|
||||
list->fl_rows = 1;
|
||||
list->fl_crefs = 1;
|
||||
list->fl_files = &list->fl_prefile;
|
||||
list->fl_prefile = list->fl_prefiles;
|
||||
spin_lock_init(&list->fl_lock);
|
||||
|
@ -457,34 +456,6 @@ void files_dumplist(FAR struct filelist *list)
|
|||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_getlist
|
||||
*
|
||||
* Description:
|
||||
* Get the list of files by tcb.
|
||||
*
|
||||
* Assumptions:
|
||||
* Called during task deletion in a safe context.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct filelist *files_getlist(FAR struct tcb_s *tcb)
|
||||
{
|
||||
FAR struct filelist *list;
|
||||
|
||||
if (tcb->group != NULL)
|
||||
{
|
||||
list = &tcb->group->tg_filelist;
|
||||
if (list->fl_crefs > 0)
|
||||
{
|
||||
list->fl_crefs++;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_putlist
|
||||
*
|
||||
|
@ -501,12 +472,6 @@ void files_putlist(FAR struct filelist *list)
|
|||
int i;
|
||||
int j;
|
||||
|
||||
DEBUGASSERT(list->fl_crefs >= 1);
|
||||
if (--list->fl_crefs > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Close each file descriptor .. Normally, you would need take the list
|
||||
* mutex, but it is safe to ignore the mutex in this context
|
||||
* because there should not be any references in this context.
|
||||
|
|
|
@ -494,7 +494,6 @@ struct filelist
|
|||
{
|
||||
spinlock_t fl_lock; /* Manage access to the file list */
|
||||
uint8_t fl_rows; /* The number of rows of fl_files array */
|
||||
uint8_t fl_crefs; /* The references to filelist */
|
||||
FAR struct file **fl_files; /* The pointer of two layer file descriptors array */
|
||||
|
||||
/* Pre-allocated files to avoid allocator access during thread creation
|
||||
|
@ -906,16 +905,6 @@ void files_dumplist(FAR struct filelist *list);
|
|||
# define files_dumplist(l)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_getlist
|
||||
*
|
||||
* Description:
|
||||
* Get the list of files by tcb.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct filelist *files_getlist(FAR struct tcb_s *tcb);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_putlist
|
||||
*
|
||||
|
|
|
@ -60,5 +60,4 @@ class FileList(Value):
|
|||
"""struct filelist_s"""
|
||||
|
||||
fl_rows: Value
|
||||
fl_crefs: Value
|
||||
fl_files: Value
|
||||
|
|
Loading…
Reference in a new issue