mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
fs: allocate file/socket dynamically
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906 Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -70,18 +70,23 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
FAR struct file_struct *filep;
|
||||
#endif
|
||||
int i;
|
||||
int j;
|
||||
|
||||
sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
|
||||
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
|
||||
|
||||
filelist = tcb->group->tg_filelist;
|
||||
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
|
||||
for (i = 0; i < filelist->fl_rows; i++)
|
||||
{
|
||||
struct inode *inode = filelist->fl_files[i].f_inode;
|
||||
if (inode)
|
||||
for (j = 0; j < CONFIG_NFILE_DESCRIPTORS_PER_BLOCK; j++)
|
||||
{
|
||||
sinfo(" fd=%d refcount=%d\n",
|
||||
i, inode->i_crefs);
|
||||
struct inode *inode = filelist->fl_files[i][j].f_inode;
|
||||
if (inode)
|
||||
{
|
||||
sinfo(" fd=%d refcount=%d\n",
|
||||
i * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK + j,
|
||||
inode->i_crefs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user