Change the name of the local variable sigset to set to prevent name collisions with the function of the same name

This commit is contained in:
Gregory Nutt 2015-07-31 13:32:10 -06:00
parent 02e90b8c2f
commit 5772813d29
3 changed files with 14 additions and 16 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* libc/aio/lio_listio.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -247,7 +247,7 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent,
{
FAR struct aiocb *aiocbp;
FAR struct lio_sighand_s *sighand;
sigset_t sigset;
sigset_t set;
struct sigaction act;
int status;
int i;
@ -292,9 +292,9 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent,
/* Make sure that SIGPOLL is not blocked */
(void)sigemptyset(&sigset);
(void)sigaddset(&sigset, SIGPOLL);
status = sigprocmask(SIG_UNBLOCK, &sigset, &sighand->oprocmask);
(void)sigemptyset(&set);
(void)sigaddset(&set, SIGPOLL);
status = sigprocmask(SIG_UNBLOCK, &set, &sighand->oprocmask);
if (status != OK)
{
int errcode = get_errno();

View File

@ -1,7 +1,7 @@
/*****************************************************************************
* sched/sched/sched_waitid.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -159,7 +159,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
FAR struct child_status_s *child;
bool retains;
#endif
sigset_t sigset;
sigset_t set;
int err;
int ret;
@ -184,8 +184,8 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
/* Create a signal set that contains only SIGCHLD */
(void)sigemptyset(&sigset);
(void)sigaddset(&sigset, SIGCHLD);
(void)sigemptyset(&set);
(void)sigaddset(&set, SIGCHLD);
/* Disable pre-emption so that nothing changes while the loop executes */
@ -352,7 +352,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
/* Wait for any death-of-child signal */
ret = sigwaitinfo(&sigset, info);
ret = sigwaitinfo(&set, info);
if (ret < 0)
{
goto errout;
@ -406,4 +406,3 @@ errout:
}
#endif /* CONFIG_SCHED_WAITPID && CONFIG_SCHED_HAVE_PARENT */

View File

@ -63,7 +63,6 @@
* Name: waitpid
*
* Description:
*
* The waitpid() functions will obtain status information pertaining to one
* of the caller's child processes. The waitpid() function will suspend
* execution of the calling thread until status information for one of the
@ -298,7 +297,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options)
bool retains;
#endif
FAR struct siginfo info;
sigset_t sigset;
sigset_t set;
int err;
int ret;
@ -316,8 +315,8 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options)
/* Create a signal set that contains only SIGCHLD */
(void)sigemptyset(&sigset);
(void)sigaddset(&sigset, SIGCHLD);
(void)sigemptyset(&set);
(void)sigaddset(&set, SIGCHLD);
/* Disable pre-emption so that nothing changes while the loop executes */
@ -498,7 +497,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options)
/* Wait for any death-of-child signal */
ret = sigwaitinfo(&sigset, &info);
ret = sigwaitinfo(&set, &info);
if (ret < 0)
{
goto errout_with_lock;