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
+5 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* libc/aio/lio_listio.c * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * 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 aiocb *aiocbp;
FAR struct lio_sighand_s *sighand; FAR struct lio_sighand_s *sighand;
sigset_t sigset; sigset_t set;
struct sigaction act; struct sigaction act;
int status; int status;
int i; int i;
@@ -292,9 +292,9 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent,
/* Make sure that SIGPOLL is not blocked */ /* Make sure that SIGPOLL is not blocked */
(void)sigemptyset(&sigset); (void)sigemptyset(&set);
(void)sigaddset(&sigset, SIGPOLL); (void)sigaddset(&set, SIGPOLL);
status = sigprocmask(SIG_UNBLOCK, &sigset, &sighand->oprocmask); status = sigprocmask(SIG_UNBLOCK, &set, &sighand->oprocmask);
if (status != OK) if (status != OK)
{ {
int errcode = get_errno(); int errcode = get_errno();
+5 -6
View File
@@ -1,7 +1,7 @@
/***************************************************************************** /*****************************************************************************
* sched/sched/sched_waitid.c * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * 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; FAR struct child_status_s *child;
bool retains; bool retains;
#endif #endif
sigset_t sigset; sigset_t set;
int err; int err;
int ret; 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 */ /* Create a signal set that contains only SIGCHLD */
(void)sigemptyset(&sigset); (void)sigemptyset(&set);
(void)sigaddset(&sigset, SIGCHLD); (void)sigaddset(&set, SIGCHLD);
/* Disable pre-emption so that nothing changes while the loop executes */ /* 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 */ /* Wait for any death-of-child signal */
ret = sigwaitinfo(&sigset, info); ret = sigwaitinfo(&set, info);
if (ret < 0) if (ret < 0)
{ {
goto errout; goto errout;
@@ -406,4 +406,3 @@ errout:
} }
#endif /* CONFIG_SCHED_WAITPID && CONFIG_SCHED_HAVE_PARENT */ #endif /* CONFIG_SCHED_WAITPID && CONFIG_SCHED_HAVE_PARENT */
+4 -5
View File
@@ -63,7 +63,6 @@
* Name: waitpid * Name: waitpid
* *
* Description: * Description:
*
* The waitpid() functions will obtain status information pertaining to one * The waitpid() functions will obtain status information pertaining to one
* of the caller's child processes. The waitpid() function will suspend * of the caller's child processes. The waitpid() function will suspend
* execution of the calling thread until status information for one of the * 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; bool retains;
#endif #endif
FAR struct siginfo info; FAR struct siginfo info;
sigset_t sigset; sigset_t set;
int err; int err;
int ret; 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 */ /* Create a signal set that contains only SIGCHLD */
(void)sigemptyset(&sigset); (void)sigemptyset(&set);
(void)sigaddset(&sigset, SIGCHLD); (void)sigaddset(&set, SIGCHLD);
/* Disable pre-emption so that nothing changes while the loop executes */ /* 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 */ /* Wait for any death-of-child signal */
ret = sigwaitinfo(&sigset, &info); ret = sigwaitinfo(&set, &info);
if (ret < 0) if (ret < 0)
{ {
goto errout_with_lock; goto errout_with_lock;