You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/10/28 16:11:58 UTC
[incubator-nuttx] 02/02: sched: use nx_close instead of close
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8c464b0e7a35bf6ae94fcecdccc31dd31af9cd29
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Wed Oct 28 17:02:56 2020 +0200
sched: use nx_close instead of close
Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
sched/group/group_setupidlefiles.c | 7 +++----
sched/task/task_spawnparms.c | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/sched/group/group_setupidlefiles.c b/sched/group/group_setupidlefiles.c
index 6b753c5..b1a0a9d 100644
--- a/sched/group/group_setupidlefiles.c
+++ b/sched/group/group_setupidlefiles.c
@@ -66,9 +66,8 @@
* tcb - tcb of the idle task.
*
* Returned Value:
- * None
- *
- * Assumptions:
+ * 0 is returned on success; a negated errno value is returned on a
+ * failure.
*
****************************************************************************/
@@ -114,7 +113,7 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb)
if (fd > 0)
{
sinfo("Open /dev/console fd: %d\n", fd);
- close(fd);
+ nx_close(fd);
}
else
{
diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c
index e7da247..3e7dffa 100644
--- a/sched/task/task_spawnparms.c
+++ b/sched/task/task_spawnparms.c
@@ -68,11 +68,11 @@ struct spawn_parms_s g_spawn_parms;
static inline int nxspawn_close(FAR struct spawn_close_file_action_s *action)
{
- /* The return value from close() is ignored */
+ /* The return value from nx_close() is ignored */
sinfo("Closing fd=%d\n", action->fd);
- close(action->fd);
+ nx_close(action->fd);
return OK;
}
@@ -131,7 +131,7 @@ static inline int nxspawn_open(FAR struct spawn_open_file_action_s *action)
}
sinfo("Closing fd=%d\n", fd);
- close(fd);
+ nx_close(fd);
}
return ret;