From 8c464b0e7a35bf6ae94fcecdccc31dd31af9cd29 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Wed, 28 Oct 2020 17:02:56 +0200 Subject: [PATCH] sched: use nx_close instead of close Signed-off-by: Juha Niskanen --- 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 6b753c553d..b1a0a9dd01 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 e7da24723b..3e7dffaede 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;