xiaoxiang781216 commented on code in PR #10913:
URL: https://github.com/apache/nuttx/pull/10913#discussion_r1359863537


##########
sched/tls/task_uninitinfo.c:
##########
@@ -24,11 +24,80 @@
 
 #include <nuttx/kmalloc.h>
 #include <nuttx/mutex.h>
-#include <nuttx/lib/lib.h>
 #include <nuttx/list.h>
 
 #include "tls.h"
 
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: task_uninit_stream
+ *
+ * Description:
+ *   This function is called when a TCB is destroyed.  Note that it does not
+ *   close the files by releasing the inode.  That happens separately when
+ *   the file descriptor list is freed.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_FILE_STREAM
+static void task_uninit_stream(FAR struct task_group_s *group)
+{
+  FAR struct streamlist *list;
+  FAR struct file_struct *stream;
+
+  DEBUGASSERT(group && group->tg_info);
+  list = &group->tg_info->ta_streamlist;
+  stream = list->sl_std;
+
+  /* Destroy the mutex and release the filelist */
+
+  nxmutex_destroy(&list->sl_lock);
+
+  /* Destroy stdin, stdout and stderr stream */
+
+#ifndef CONFIG_STDIO_DISABLE_BUFFERING
+  nxrmutex_destroy(&stream->fs_lock);
+  nxrmutex_destroy(&stream->fs_lock);
+  nxrmutex_destroy(&stream->fs_lock);

Review Comment:
   @davids5 what's problem do you want to ask?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to