sched/signal: Wrap long lines to make nxstyle happy

This commit is contained in:
YAMAMOTO Takashi 2020-03-10 13:50:49 +09:00 committed by Abdelatif Guettouche
parent 842b0c54d4
commit a0bfc24b4c
8 changed files with 40 additions and 27 deletions

View file

@ -145,7 +145,8 @@ static FAR sigactq_t *nxsig_alloc_action(void)
* on failure
* sigaction:
* Zero (OK) is returned on success; -1 (ERROR) is returned on any
* failure if the signal number is invalid with the errno set appropriately
* failure if the signal number is invalid with the errno set
* appropriately
*
* Assumptions:
*
@ -153,8 +154,9 @@ static FAR sigactq_t *nxsig_alloc_action(void)
* - If CONFIG_SIG_DEFAULT is not defined, then there are no default actions
* so the special value SIG_DFL is treated like SIG_IGN.
* - All sa_flags in struct sigaction of act input are ignored (all
* treated like SA_SIGINFO). The one exception is if CONFIG_SCHED_CHILD_STATUS
* is defined; then SA_NOCLDWAIT is supported but only for SIGCHLD
* treated like SA_SIGINFO). The one exception is if
* CONFIG_SCHED_CHILD_STATUS is defined; then SA_NOCLDWAIT is supported but
* only for SIGCHLD
*
****************************************************************************/

View file

@ -98,14 +98,16 @@ void nxsig_release(FAR struct task_group_s *group)
/* Deallocate all entries in the list of signal actions */
while ((sigact = (FAR sigactq_t *)sq_remfirst(&group->tg_sigactionq)) != NULL)
while ((sigact = (FAR sigactq_t *)sq_remfirst(&group->tg_sigactionq))
!= NULL)
{
nxsig_release_action(sigact);
}
/* Deallocate all entries in the list of pending signals */
while ((sigpend = (FAR sigpendq_t *)sq_remfirst(&group->tg_sigpendingq)) != NULL)
while ((sigpend = (FAR sigpendq_t *)sq_remfirst(&group->tg_sigpendingq))
!= NULL)
{
nxsig_release_pendingsignal(sigpend);
}

View file

@ -101,7 +101,8 @@ static void nxsig_stop_task(int signo);
static _sa_handler_t nxsig_default_action(int signo);
static void nxsig_setup_default_action(FAR struct task_group_s *group,
FAR const struct nxsig_defaction_s *info);
FAR const struct nxsig_defaction_s *
info);
/****************************************************************************
* Private Data
@ -240,8 +241,8 @@ static void nxsig_abnormal_termination(int signo)
if ((rtcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0)
{
/* Then we cannot cancel the task asynchronously. Mark the cancellation
* as pending.
/* Then we cannot cancel the task asynchronously.
* Mark the cancellation as pending.
*/
rtcb->flags |= TCB_FLAG_CANCEL_PENDING;
@ -437,7 +438,8 @@ static _sa_handler_t nxsig_default_action(int signo)
****************************************************************************/
static void nxsig_setup_default_action(FAR struct task_group_s *group,
FAR const struct nxsig_defaction_s *info)
FAR const struct nxsig_defaction_s *
info)
{
/* Get the address of the handler for this signals default action. */

View file

@ -124,7 +124,8 @@ static sigpendq_t *g_sigpendingirqsignalalloc;
static sigq_t *nxsig_alloc_block(sq_queue_t *siglist, uint16_t nsigs,
uint8_t sigtype);
static sigpendq_t *nxsig_alloc_pendingsignalblock(sq_queue_t *siglist,
uint16_t nsigs, uint8_t sigtype);
uint16_t nsigs,
uint8_t sigtype);
/****************************************************************************
* Private Functions
@ -172,7 +173,8 @@ static FAR sigq_t *nxsig_alloc_block(sq_queue_t *siglist, uint16_t nsigs,
****************************************************************************/
static sigpendq_t *nxsig_alloc_pendingsignalblock(sq_queue_t *siglist,
uint16_t nsigs, uint8_t sigtype)
uint16_t nsigs,
uint8_t sigtype)
{
FAR sigpendq_t *sigpendalloc;
FAR sigpendq_t *sigpend;

View file

@ -213,10 +213,11 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
* suspended from execution until either the time value of the clock
* specified by clock_id reaches the absolute time specified by the rqtp
* argument, or a signal is delivered to the calling thread and its action
* is to invoke a signal-catching function, or the process is terminated. If,
* at the time of the call, the time value specified by rqtp is less than
* or equal to the time value of the specified clock, then clock_nanosleep()
* will return immediately and the calling process will not be suspended.
* is to invoke a signal-catching function, or the process is terminated.
* If, at the time of the call, the time value specified by rqtp is less
* than or equal to the time value of the specified clock, then
* clock_nanosleep() will return immediately and the calling process will
* not be suspended.
*
* The suspension time caused by this function may be longer than requested
* because the argument value is rounded up to an integer multiple of the
@ -250,12 +251,12 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
* If the clock_nanosleep() function returns because the requested time has
* elapsed, its return value is zero.
*
* If the clock_nanosleep() function returns because it has been interrupted by
* a signal, the function returns a value of -1 and sets errno to indicate
* the interruption. If the rmtp argument is non-NULL, the timespec
* structure referenced by it is updated to contain the amount of time
* remaining in the interval (the requested time minus the time actually
* slept). If the rmtp argument is NULL, the remaining time is not
* If the clock_nanosleep() function returns because it has been
* interrupted by a signal, the function returns a value of -1 and sets
* errno to indicate the interruption. If the rmtp argument is non-NULL,
* the timespec structure referenced by it is updated to contain the amount
* of time remaining in the interval (the requested time minus the time
* actually slept). If the rmtp argument is NULL, the remaining time is not
* returned.
*
* If clock_nanosleep() fails, it returns a value of -1 and sets errno to

View file

@ -1,7 +1,8 @@
/****************************************************************************
* sched/signal/sig_releasependingsignal.c
*
* Copyright (C) 2007, 2009, 2014, 2016-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2014, 2016-2017 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View file

@ -77,7 +77,8 @@ FAR sigpendq_t *nxsig_remove_pendingsignal(FAR struct tcb_s *stcb, int signo)
flags = enter_critical_section();
for (prevsig = NULL, currsig = (FAR sigpendq_t *)group->tg_sigpendingq.head;
for (prevsig = NULL,
currsig = (FAR sigpendq_t *)group->tg_sigpendingq.head;
(currsig && currsig->info.si_signo != signo);
prevsig = currsig, currsig = currsig->flink);

View file

@ -269,7 +269,8 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
* pending.
*/
sigpend = nxsig_remove_pendingsignal(rtcb, nxsig_lowest(&intersection));
sigpend = nxsig_remove_pendingsignal(rtcb,
nxsig_lowest(&intersection));
DEBUGASSERT(sigpend);
/* Return the signal info to the caller if so requested */
@ -325,7 +326,8 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
#ifdef CONFIG_HAVE_LONG_LONG
uint64_t waitticks64 = ((uint64_t)timeout->tv_sec * NSEC_PER_SEC +
(uint64_t)timeout->tv_nsec + NSEC_PER_TICK - 1) /
(uint64_t)timeout->tv_nsec +
NSEC_PER_TICK - 1) /
NSEC_PER_TICK;
DEBUGASSERT(waitticks64 <= UINT32_MAX);
waitticks = (uint32_t)waitticks64;
@ -400,8 +402,8 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
if (GOOD_SIGNO(rtcb->sigunbinfo.si_signo))
{
/* We were awakened by a signal... but is it one of the signals that
* we were waiting for?
/* We were awakened by a signal... but is it one of the signals
* that we were waiting for?
*/
if (sigismember(set, rtcb->sigunbinfo.si_signo))