You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/10 10:13:53 UTC

[incubator-nuttx] branch master updated: sched/signal: Wrap long lines to make nxstyle happy

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a0bfc24  sched/signal: Wrap long lines to make nxstyle happy
a0bfc24 is described below

commit a0bfc24b4cc580f4bfea4aeea5fbe1b4aee14751
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Mar 10 13:50:49 2020 +0900

    sched/signal: Wrap long lines to make nxstyle happy
---
 sched/signal/sig_action.c               |  8 +++++---
 sched/signal/sig_cleanup.c              |  6 ++++--
 sched/signal/sig_default.c              | 10 ++++++----
 sched/signal/sig_initialize.c           |  6 ++++--
 sched/signal/sig_nanosleep.c            | 21 +++++++++++----------
 sched/signal/sig_releasependingsignal.c |  3 ++-
 sched/signal/sig_removependingsignal.c  |  3 ++-
 sched/signal/sig_timedwait.c            | 10 ++++++----
 8 files changed, 40 insertions(+), 27 deletions(-)

diff --git a/sched/signal/sig_action.c b/sched/signal/sig_action.c
index e9eaa57..e8394fd 100644
--- a/sched/signal/sig_action.c
+++ b/sched/signal/sig_action.c
@@ -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
  *
  ****************************************************************************/
 
diff --git a/sched/signal/sig_cleanup.c b/sched/signal/sig_cleanup.c
index 5047f0a..ce41c66 100644
--- a/sched/signal/sig_cleanup.c
+++ b/sched/signal/sig_cleanup.c
@@ -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);
     }
diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c
index f03b505..135a53e 100644
--- a/sched/signal/sig_default.c
+++ b/sched/signal/sig_default.c
@@ -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. */
 
diff --git a/sched/signal/sig_initialize.c b/sched/signal/sig_initialize.c
index 9e9a75e..3f9bab9 100644
--- a/sched/signal/sig_initialize.c
+++ b/sched/signal/sig_initialize.c
@@ -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;
diff --git a/sched/signal/sig_nanosleep.c b/sched/signal/sig_nanosleep.c
index ca1490a..bf977df 100644
--- a/sched/signal/sig_nanosleep.c
+++ b/sched/signal/sig_nanosleep.c
@@ -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
diff --git a/sched/signal/sig_releasependingsignal.c b/sched/signal/sig_releasependingsignal.c
index d71cf8c..65663d3 100644
--- a/sched/signal/sig_releasependingsignal.c
+++ b/sched/signal/sig_releasependingsignal.c
@@ -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 <gn...@nuttx.org>
  *
  * Redistribution and use in source and binary forms, with or without
diff --git a/sched/signal/sig_removependingsignal.c b/sched/signal/sig_removependingsignal.c
index 60a3139..a162b70 100644
--- a/sched/signal/sig_removependingsignal.c
+++ b/sched/signal/sig_removependingsignal.c
@@ -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);
 
diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c
index 727e1a4..4ccc5e9 100644
--- a/sched/signal/sig_timedwait.c
+++ b/sched/signal/sig_timedwait.c
@@ -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))