[PATCH 2/2] [cpukit/POSIX] Renamed POSIX signal functions to match style of the other POSIX related functions

Joel Sherrill joel.sherrill at OARcorp.com
Tue Mar 19 14:21:35 UTC 2013


I am about to travel to an Open Group meeting but I
spotted a couple of things and wanted to understand
what you thought was wrong and changed.

+ Your tree is NOT up to date. It has ChangeLog files in it.
+ You did a blind search and replace since it changed ChangeLog
entries before your change was made.

Now to see if I can understand what you were trying to
do specifically. Can you give a very simple summary with
details. Like "renamed X to Y". "Changed include from X to
Y after renaming file." etc.  The patch appears to be the
result of a global search and replace and it would be
easier to review if we knew what that was.

The naming convention is Package_Member. The _ followed
by a word with leading capital letter indicates that separation.
Read this as Package::Member for C++ or Package.Member in Ada.

If a Package or Method has multiple words in its name, then
the first word is leading caps. UNLESS there is an acronym which
should be honored.  So _POSIX_message_queue_Initialize_buffers
should be an example (I hope correct) of the naming convention.

FYI that is likely not a real method. I made the name up. :)

I don't doubt there are inconsistencies. It is just easier to review
if we know what you were renaming.

--joel
On 3/19/2013 8:48 AM, Andreas Heinig wrote:
> ---
>   cpukit/ChangeLog                                |    8 +--
>   cpukit/posix/include/rtems/posix/psignalimpl.h  |   46 ++++++++---------
>   cpukit/posix/src/alarm.c                        |    8 +--
>   cpukit/posix/src/killinfo.c                     |   22 ++++-----
>   cpukit/posix/src/psignal.c                      |   60 +++++++++++------------
>   cpukit/posix/src/psignalchecksignal.c           |   18 +++----
>   cpukit/posix/src/psignalclearprocesssignals.c   |   10 ++--
>   cpukit/posix/src/psignalclearsignals.c          |   16 +++---
>   cpukit/posix/src/psignalsetprocesssignals.c     |    4 +-
>   cpukit/posix/src/psignalunblockthread.c         |    2 +-
>   cpukit/posix/src/pthreadkill.c                  |    6 +--
>   cpukit/posix/src/pthreadsigmask.c               |    2 +-
>   cpukit/posix/src/sigaction.c                    |    8 +--
>   cpukit/posix/src/sigpending.c                   |    2 +-
>   cpukit/posix/src/sigtimedwait.c                 |   20 ++++----
>   cpukit/posix/src/ualarm.c                       |   10 ++--
>   cpukit/sapi/src/posixapi.c                      |    2 +-
>   testsuites/psxtests/ChangeLog                   |    2 +-
>   testsuites/psxtests/psx15/init.c                |    2 +-
>   testsuites/psxtests/psxsignal01/init.c          |    4 +-
>   testsuites/psxtests/psxsignal05/init.c          |    6 +--
>   testsuites/psxtests/psxsignal05/psxsignal05.doc |    2 +-
>   testsuites/psxtests/psxsignal05/psxsignal05.scn |    2 +-
>   testsuites/psxtests/psxualarm/init.c            |    2 +-
>   24 files changed, 132 insertions(+), 132 deletions(-)
>
> diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
> index 5c8e2b1..358b42d 100644
> --- a/cpukit/ChangeLog
> +++ b/cpukit/ChangeLog
> @@ -101,7 +101,7 @@
>
>   2011-12-10     Ralf Corsépius <ralf.corsepius at rtems.org>
>
> -       * posix/src/sigtimedwait.c: Make _POSIX_signals_Get_lowest static.
> +       * posix/src/sigtimedwait.c: Make _POSIX_Signals_Get_lowest static.
>
>   2011-12-09     Joel Sherrill <joel.sherrill at oarcorp.com>
>
> @@ -744,10 +744,10 @@
>          Comment out unused vars "group", "group_base".
>          * libmisc/monitor/mon-editor.c (rtems_monitor_task):
>          Comment out unused vars "debugee", "rp", "fp".
> -       * posix/src/alarm.c: Make _POSIX_signals_Alarm_TSR static.
> +       * posix/src/alarm.c: Make _POSIX_Signals_Alarm_TSR static.
>          Remove unused var "status".
>          * libmisc/shell/main_ls.c: Comment out unused var kflag.
> -       * posix/src/ualarm.c: Make _POSIX_signals_Ualarm_TSR static.
> +       * posix/src/ualarm.c: Make _POSIX_Signals_Ualarm_TSR static.
>
>   2011-10-12     Ralf Corsépius <ralf.corsepius at rtems.org>
>
> @@ -7393,7 +7393,7 @@
>
>   2009-08-05     Joel Sherrill <joel.sherrill at oarcorp.com>
>
> -       * posix/src/sigaction.c: _POSIX_signals_Clear_process_signals now takes
> +       * posix/src/sigaction.c: _POSIX_Signals_Clear_process_signals now takes
>          signal number not mask.
>
>   2009-08-05     Joel Sherrill <joel.sherrill at OARcorp.com>
> diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
> index 481a7ea..334c2fa 100644
> --- a/cpukit/posix/include/rtems/posix/psignalimpl.h
> +++ b/cpukit/posix/include/rtems/posix/psignalimpl.h
> @@ -39,13 +39,13 @@
>         (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
>
>   #define SIGACTION_TERMINATE \
> -  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
> +  { 0, SIGNAL_ALL_MASK, {_POSIX_Signals_Abnormal_termination_handler} }
>   #define SIGACTION_IGNORE \
>     { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
>   #define SIGACTION_STOP \
> -  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
> +  { 0, SIGNAL_ALL_MASK, {_POSIX_Signals_Stop_handler} }
>   #define SIGACTION_CONTINUE \
> -  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
> +  { 0, SIGNAL_ALL_MASK, {_POSIX_Signals_Continue_handler} }
>
>   #define SIG_ARRAY_MAX  (SIGRTMAX + 1)
>
> @@ -53,23 +53,23 @@
>    *  Variables
>    */
>
> -extern sigset_t  _POSIX_signals_Pending;
> +extern sigset_t  _POSIX_Signals_Pending;
>
> -extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
> +extern const struct sigaction _POSIX_Signals_Default_vectors[ SIG_ARRAY_MAX ];
>
> -extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
> +extern struct sigaction _POSIX_Signals_Vectors[ SIG_ARRAY_MAX ];
>
> -extern Watchdog_Control _POSIX_signals_Alarm_timer;
> +extern Watchdog_Control _POSIX_Signals_Alarm_timer;
>
> -extern Watchdog_Control _POSIX_signals_Ualarm_timer;
> +extern Watchdog_Control _POSIX_Signals_Ualarm_timer;
>
> -extern Thread_queue_Control _POSIX_signals_Wait_queue;
> +extern Thread_queue_Control _POSIX_Signals_Wait_queue;
>
> -extern Chain_Control _POSIX_signals_Inactive_siginfo;
> +extern Chain_Control _POSIX_Signals_Inactive_siginfo;
>
> -extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
> +extern Chain_Control _POSIX_Signals_Siginfo[ SIG_ARRAY_MAX ];
>
> -extern API_extensions_Post_switch_control _POSIX_signals_Post_switch;
> +extern API_extensions_Post_switch_control _POSIX_Signals_Post_switch;
>
>   /*
>    *  Internal routines
> @@ -78,11 +78,11 @@ extern API_extensions_Post_switch_control _POSIX_signals_Post_switch;
>   /**
>    * @brief POSIX signals manager initialization.
>    */
> -void _POSIX_signals_Manager_Initialization(void);
> +void _POSIX_Signals_Manager_initialization(void);
>
> -static inline void _POSIX_signals_Add_post_switch_extension(void)
> +static inline void _POSIX_Signals_Add_post_switch_extension(void)
>   {
> -  _API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
> +  _API_extensions_Add_post_switch( &_POSIX_Signals_Post_switch );
>   }
>
>   /**
> @@ -90,7 +90,7 @@ static inline void _POSIX_signals_Add_post_switch_extension(void)
>    *
>    * XXX this routine could probably be cleaned up
>    */
> -bool _POSIX_signals_Unblock_thread(
> +bool _POSIX_Signals_Unblock_thread(
>     Thread_Control  *the_thread,
>     int              signo,
>     siginfo_t       *info
> @@ -99,7 +99,7 @@ bool _POSIX_signals_Unblock_thread(
>   /**
>    *  @brief Check POSIX signal.
>    */
> -bool _POSIX_signals_Check_signal(
> +bool _POSIX_Signals_Check_signal(
>     POSIX_API_Control  *api,
>     int                 signo,
>     bool                is_global
> @@ -108,7 +108,7 @@ bool _POSIX_signals_Check_signal(
>   /**
>    * @brief Clear POSIX signals.
>    */
> -bool _POSIX_signals_Clear_signals(
> +bool _POSIX_Signals_Clear_signals(
>     POSIX_API_Control  *api,
>     int                 signo,
>     siginfo_t          *info,
> @@ -125,11 +125,11 @@ int killinfo(
>   /**
>    *  @brief Set POSIX process signals.
>    */
> -void _POSIX_signals_Set_process_signals(
> +void _POSIX_Signals_Set_process_signals(
>     sigset_t   mask
>   );
>
> -void _POSIX_signals_Clear_process_signals(
> +void _POSIX_Signals_Clear_process_signals(
>     int        signo
>   );
>
> @@ -137,10 +137,10 @@ void _POSIX_signals_Clear_process_signals(
>    *  Default signal handlers
>    */
>
> -#define _POSIX_signals_Stop_handler NULL
> -#define _POSIX_signals_Continue_handler NULL
> +#define _POSIX_Signals_Stop_handler NULL
> +#define _POSIX_Signals_Continue_handler NULL
>
> -void _POSIX_signals_Abnormal_termination_handler( int signo );
> +void _POSIX_Signals_Abnormal_termination_handler( int signo );
>
>   /** @} */
>
> diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
> index 5130b01..bbe45cb 100644
> --- a/cpukit/posix/src/alarm.c
> +++ b/cpukit/posix/src/alarm.c
> @@ -28,10 +28,10 @@
>   #include <rtems/posix/psignalimpl.h>
>
>   /*
> - *  _POSIX_signals_Alarm_TSR
> + *  _POSIX_Signals_Alarm_TSR
>    */
>
> -static void _POSIX_signals_Alarm_TSR(
> +static void _POSIX_Signals_Alarm_TSR(
>     Objects_Id      id __attribute__((unused)),
>     void           *argument __attribute__((unused))
>   )
> @@ -47,14 +47,14 @@ unsigned int alarm(
>     unsigned int      remaining = 0;
>     Watchdog_Control *the_timer;
>
> -  the_timer = &_POSIX_signals_Alarm_timer;
> +  the_timer = &_POSIX_Signals_Alarm_timer;
>
>     /*
>      *  Initialize the timer used to implement alarm().
>      */
>
>     if ( !the_timer->routine ) {
> -    _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
> +    _Watchdog_Initialize( the_timer, _POSIX_Signals_Alarm_TSR, 0, NULL );
>     } else {
>       Watchdog_States state;
>
> diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
> index f386757..c2b1967 100644
> --- a/cpukit/posix/src/killinfo.c
> +++ b/cpukit/posix/src/killinfo.c
> @@ -51,7 +51,7 @@
>    *  NOTE: Behavior of kill() depends on _POSIX_SAVED_IDS.
>    */
>
> -#define _POSIX_signals_Is_interested( _api, _mask ) \
> +#define _POSIX_Signals_Is_interested( _api, _mask ) \
>     ( ~(_api)->signals_blocked & (_mask) )
>
>   int killinfo(
> @@ -94,7 +94,7 @@ int killinfo(
>     /*
>      *  If the signal is being ignored, then we are out of here.
>      */
> -  if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
> +  if ( _POSIX_Signals_Vectors[ sig ].sa_handler == SIG_IGN )
>       return 0;
>
>     /*
> @@ -121,7 +121,7 @@ int killinfo(
>
>     _Thread_Disable_dispatch();
>
> -  _POSIX_signals_Add_post_switch_extension();
> +  _POSIX_Signals_Add_post_switch_extension();
>
>     /*
>      *  Is the currently executing thread interested?  If so then it will
> @@ -130,7 +130,7 @@ int killinfo(
>     the_thread = _Thread_Executing;
>
>     api = the_thread->API_Extensions[ THREAD_API_POSIX ];
> -  if ( _POSIX_signals_Is_interested( api, mask ) ) {
> +  if ( _POSIX_Signals_Is_interested( api, mask ) ) {
>       goto process_it;
>     }
>
> @@ -142,7 +142,7 @@ int killinfo(
>
>     /* XXX violation of visibility -- need to define thread queue support */
>
> -  the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
> +  the_chain = &_POSIX_Signals_Wait_queue.Queues.Fifo;
>
>     for ( the_node = _Chain_First( the_chain );
>           !_Chain_Is_tail( the_chain, the_node ) ;
> @@ -244,7 +244,7 @@ int killinfo(
>             continue;
>         #endif
>
> -      if ( !_POSIX_signals_Is_interested( api, mask ) )
> +      if ( !_POSIX_Signals_Is_interested( api, mask ) )
>           continue;
>         DEBUG_STEP("3");
>
> @@ -325,7 +325,7 @@ process_it:
>      *  Returns true if the signal was synchronously given to a thread
>      *  blocked waiting for the signal.
>      */
> -  if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
> +  if ( _POSIX_Signals_Unblock_thread( the_thread, sig, siginfo ) ) {
>       _Thread_Enable_dispatch();
>       return 0;
>     }
> @@ -336,12 +336,12 @@ post_process_signal:
>      *  We may have woken up a thread but we definitely need to post the
>      *  signal to the process wide information set.
>      */
> -  _POSIX_signals_Set_process_signals( mask );
> +  _POSIX_Signals_Set_process_signals( mask );
>
> -  if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
> +  if ( _POSIX_Signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
>
>       psiginfo = (POSIX_signals_Siginfo_node *)
> -               _Chain_Get( &_POSIX_signals_Inactive_siginfo );
> +               _Chain_Get( &_POSIX_Signals_Inactive_siginfo );
>       if ( !psiginfo ) {
>         _Thread_Enable_dispatch();
>         rtems_set_errno_and_return_minus_one( EAGAIN );
> @@ -349,7 +349,7 @@ post_process_signal:
>
>       psiginfo->Info = *siginfo;
>
> -    _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
> +    _Chain_Append( &_POSIX_Signals_Siginfo[ sig ], &psiginfo->Node );
>     }
>
>     DEBUG_STEP("\n");
> diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
> index e490877..fbd0dd9 100644
> --- a/cpukit/posix/src/psignal.c
> +++ b/cpukit/posix/src/psignal.c
> @@ -42,16 +42,16 @@
>
>   /*** PROCESS WIDE STUFF ****/
>
> -sigset_t  _POSIX_signals_Pending;
> +sigset_t  _POSIX_Signals_Pending;
>
> -void _POSIX_signals_Abnormal_termination_handler(
> +void _POSIX_Signals_Abnormal_termination_handler(
>     int signo __attribute__((unused)) )
>   {
>     exit( 1 );
>   }
>
>   #define SIG_ARRAY_MAX  (SIGRTMAX + 1)
> -const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ] = {
> +const struct sigaction _POSIX_Signals_Default_vectors[ SIG_ARRAY_MAX ] = {
>     /* NO SIGNAL 0 */  SIGACTION_IGNORE,
>     /* SIGHUP    1 */  SIGACTION_TERMINATE,
>     /* SIGINT    2 */  SIGACTION_TERMINATE,
> @@ -87,15 +87,15 @@ const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ] = {
>     /* SIGRTMAX 31 */  SIGACTION_TERMINATE
>   };
>
> -struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
> +struct sigaction _POSIX_Signals_Vectors[ SIG_ARRAY_MAX ];
>
> -Thread_queue_Control _POSIX_signals_Wait_queue;
> +Thread_queue_Control _POSIX_Signals_Wait_queue;
>
> -Chain_Control _POSIX_signals_Inactive_siginfo;
> -Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
> +Chain_Control _POSIX_Signals_Inactive_siginfo;
> +Chain_Control _POSIX_Signals_Siginfo[ SIG_ARRAY_MAX ];
>
> -Watchdog_Control _POSIX_signals_Alarm_timer;
> -Watchdog_Control _POSIX_signals_Ualarm_timer;
> +Watchdog_Control _POSIX_Signals_Alarm_timer;
> +Watchdog_Control _POSIX_Signals_Ualarm_timer;
>
>   /*
>    *  XXX - move these
> @@ -107,10 +107,10 @@ Watchdog_Control _POSIX_signals_Ualarm_timer;
>         (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
>
>   /*
> - *  _POSIX_signals_Post_switch_extension
> + *  _POSIX_Signals_Post_switch_extension
>    */
>
> -static void _POSIX_signals_Post_switch_hook(
> +static void _POSIX_Signals_Post_switch_hook(
>     Thread_Control  *the_thread
>   )
>   {
> @@ -144,32 +144,32 @@ static void _POSIX_signals_Post_switch_hook(
>     while (1) {
>       _ISR_Disable( level );
>         if ( !(~api->signals_blocked &
> -            (api->signals_pending | _POSIX_signals_Pending)) ) {
> +            (api->signals_pending | _POSIX_Signals_Pending)) ) {
>          _ISR_Enable( level );
>          break;
>        }
>       _ISR_Enable( level );
>
>       for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
> -      _POSIX_signals_Check_signal( api, signo, false );
> -      _POSIX_signals_Check_signal( api, signo, true );
> +      _POSIX_Signals_Check_signal( api, signo, false );
> +      _POSIX_Signals_Check_signal( api, signo, true );
>       }
>       /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
>
>       for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
> -      _POSIX_signals_Check_signal( api, signo, false );
> -      _POSIX_signals_Check_signal( api, signo, true );
> +      _POSIX_Signals_Check_signal( api, signo, false );
> +      _POSIX_Signals_Check_signal( api, signo, true );
>       }
>     }
>
>     _Thread_Executing->Wait.return_code = hold_errno;
>   }
>
> -API_extensions_Post_switch_control _POSIX_signals_Post_switch = {
> -  .hook = _POSIX_signals_Post_switch_hook
> +API_extensions_Post_switch_control _POSIX_Signals_Post_switch = {
> +  .hook = _POSIX_Signals_Post_switch_hook
>   };
>
> -void _POSIX_signals_Manager_Initialization(void)
> +void _POSIX_Signals_Manager_initialization(void)
>   {
>     uint32_t   signo;
>     uint32_t   maximum_queued_signals;
> @@ -182,26 +182,26 @@ void _POSIX_signals_Manager_Initialization(void)
>
>     #if defined(RTEMS_DEBUG)
>       assert(
> -     sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
> +     sizeof(_POSIX_Signals_Vectors) == sizeof(_POSIX_Signals_Default_vectors)
>       );
>     #endif
>
>     memcpy(
> -    _POSIX_signals_Vectors,
> -    _POSIX_signals_Default_vectors,
> -    sizeof( _POSIX_signals_Vectors )
> +    _POSIX_Signals_Vectors,
> +    _POSIX_Signals_Default_vectors,
> +    sizeof( _POSIX_Signals_Vectors )
>     );
>
>     /*
>      *  Initialize the set of pending signals for the entire process
>      */
> -  sigemptyset( &_POSIX_signals_Pending );
> +  sigemptyset( &_POSIX_Signals_Pending );
>
>     /*
>      *  Initialize the queue we use to block for signals
>      */
>     _Thread_queue_Initialize(
> -    &_POSIX_signals_Wait_queue,
> +    &_POSIX_Signals_Wait_queue,
>       THREAD_QUEUE_DISCIPLINE_FIFO,
>       STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
>       EAGAIN
> @@ -213,11 +213,11 @@ void _POSIX_signals_Manager_Initialization(void)
>      *  Allocate the siginfo pools.
>      */
>     for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
> -    _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
> +    _Chain_Initialize_empty( &_POSIX_Signals_Siginfo[ signo ] );
>
>     if ( maximum_queued_signals ) {
>       _Chain_Initialize(
> -      &_POSIX_signals_Inactive_siginfo,
> +      &_POSIX_Signals_Inactive_siginfo,
>         _Workspace_Allocate_or_fatal_error(
>           maximum_queued_signals * sizeof( POSIX_signals_Siginfo_node )
>         ),
> @@ -225,12 +225,12 @@ void _POSIX_signals_Manager_Initialization(void)
>         sizeof( POSIX_signals_Siginfo_node )
>       );
>     } else {
> -    _Chain_Initialize_empty( &_POSIX_signals_Inactive_siginfo );
> +    _Chain_Initialize_empty( &_POSIX_Signals_Inactive_siginfo );
>     }
>
>     /*
>      *  Initialize the Alarm Timer
>      */
> -  _Watchdog_Initialize( &_POSIX_signals_Alarm_timer, NULL, 0, NULL );
> -  _Watchdog_Initialize( &_POSIX_signals_Ualarm_timer, NULL, 0, NULL );
> +  _Watchdog_Initialize( &_POSIX_Signals_Alarm_timer, NULL, 0, NULL );
> +  _Watchdog_Initialize( &_POSIX_Signals_Ualarm_timer, NULL, 0, NULL );
>   }
> diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c
> index 57237d3..f2c0e1b 100644
> --- a/cpukit/posix/src/psignalchecksignal.c
> +++ b/cpukit/posix/src/psignalchecksignal.c
> @@ -38,7 +38,7 @@
>   #include <rtems/posix/time.h>
>   #include <stdio.h>
>
> -bool    _POSIX_signals_Check_signal(
> +bool    _POSIX_Signals_Check_signal(
>     POSIX_API_Control  *api,
>     int                 signo,
>     bool                is_global
> @@ -48,7 +48,7 @@ bool    _POSIX_signals_Check_signal(
>     sigset_t                    saved_signals_blocked;
>     Thread_Wait_information     stored_thread_wait_information;
>
> -  if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
> +  if ( ! _POSIX_Signals_Clear_signals( api, signo, &siginfo_struct,
>                                          is_global, true ) )
>       return false;
>
> @@ -57,21 +57,21 @@ bool    _POSIX_signals_Check_signal(
>      *  safer.
>      */
>     #if defined(RTEMS_DEBUG)
> -    assert( _POSIX_signals_Vectors[ signo ].sa_handler ||
> -            _POSIX_signals_Vectors[ signo ].sa_sigaction );
> +    assert( _POSIX_Signals_Vectors[ signo ].sa_handler ||
> +            _POSIX_Signals_Vectors[ signo ].sa_sigaction );
>     #endif
>
>     /*
>      *  Just to prevent sending a signal which is currently being ignored.
>      */
> -  if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
> +  if ( _POSIX_Signals_Vectors[ signo ].sa_handler == SIG_IGN )
>       return false;
>
>     /*
>      *  Block the signals requested in sa_mask
>      */
>     saved_signals_blocked = api->signals_blocked;
> -  api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
> +  api->signals_blocked |= _POSIX_Signals_Vectors[ signo ].sa_mask;
>
>     /*
>      *  We have to save the blocking information of the current wait queue
> @@ -84,16 +84,16 @@ bool    _POSIX_signals_Check_signal(
>     /*
>      *  Here, the signal handler function executes
>      */
> -  switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
> +  switch ( _POSIX_Signals_Vectors[ signo ].sa_flags ) {
>       case SA_SIGINFO:
> -      (*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
> +      (*_POSIX_Signals_Vectors[ signo ].sa_sigaction)(
>           signo,
>           &siginfo_struct,
>           NULL        /* context is undefined per 1003.1b-1993, p. 66 */
>         );
>         break;
>       default:
> -      (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
> +      (*_POSIX_Signals_Vectors[ signo ].sa_handler)( signo );
>         break;
>     }
>
> diff --git a/cpukit/posix/src/psignalclearprocesssignals.c b/cpukit/posix/src/psignalclearprocesssignals.c
> index b16398c..c8336cd 100644
> --- a/cpukit/posix/src/psignalclearprocesssignals.c
> +++ b/cpukit/posix/src/psignalclearprocesssignals.c
> @@ -35,10 +35,10 @@
>   #include <stdio.h>
>
>   /*
> - *  _POSIX_signals_Clear_process_signals
> + *  _POSIX_Signals_Clear_process_signals
>    */
>
> -void _POSIX_signals_Clear_process_signals(
> +void _POSIX_Signals_Clear_process_signals(
>     int signo
>   )
>   {
> @@ -51,12 +51,12 @@ void _POSIX_signals_Clear_process_signals(
>     ISR_Level  level;
>
>     _ISR_Disable( level );
> -    if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
> -      if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
> +    if ( _POSIX_Signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
> +      if ( !_Chain_Is_empty( &_POSIX_Signals_Siginfo[ signo ] ) )
>          clear_signal = false;
>       }
>       if ( clear_signal ) {
> -      _POSIX_signals_Pending &= ~mask;
> +      _POSIX_Signals_Pending &= ~mask;
>       }
>     _ISR_Enable( level );
>   }
> diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
> index e71f2fa..4f9e54e 100644
> --- a/cpukit/posix/src/psignalclearsignals.c
> +++ b/cpukit/posix/src/psignalclearsignals.c
> @@ -35,10 +35,10 @@
>   #include <stdio.h>
>
>   /*
> - *  _POSIX_signals_Clear_signals
> + *  _POSIX_Signals_Clear_signals
>    */
>
> -bool _POSIX_signals_Clear_signals(
> +bool _POSIX_Signals_Clear_signals(
>     POSIX_API_Control  *api,
>     int                 signo,
>     siginfo_t          *info,
> @@ -70,11 +70,11 @@ bool _POSIX_signals_Clear_signals(
>
>     _ISR_Disable( level );
>       if ( is_global ) {
> -       if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
> -         if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
> +       if ( mask & (_POSIX_Signals_Pending & signals_blocked) ) {
> +         if ( _POSIX_Signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
>              psiginfo = (POSIX_signals_Siginfo_node *)
> -             _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
> -           _POSIX_signals_Clear_process_signals( signo );
> +             _Chain_Get_unprotected( &_POSIX_Signals_Siginfo[ signo ] );
> +           _POSIX_Signals_Clear_process_signals( signo );
>              /*
>               *  It may be impossible to get here with an empty chain
>               *  BUT until that is proven we need to be defensive and
> @@ -83,13 +83,13 @@ bool _POSIX_signals_Clear_signals(
>              if ( psiginfo ) {
>                *info = psiginfo->Info;
>                _Chain_Append_unprotected(
> -               &_POSIX_signals_Inactive_siginfo,
> +               &_POSIX_Signals_Inactive_siginfo,
>                  &psiginfo->Node
>                );
>              } else
>                do_callout = false;
>            }
> -         _POSIX_signals_Clear_process_signals( signo );
> +         _POSIX_Signals_Clear_process_signals( signo );
>            do_callout = true;
>          }
>       } else {
> diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
> index 92c1d81..7ecb8e6 100644
> --- a/cpukit/posix/src/psignalsetprocesssignals.c
> +++ b/cpukit/posix/src/psignalsetprocesssignals.c
> @@ -34,13 +34,13 @@
>   #include <rtems/posix/time.h>
>   #include <stdio.h>
>
> -void _POSIX_signals_Set_process_signals(
> +void _POSIX_Signals_Set_process_signals(
>     sigset_t   mask
>   )
>   {
>     ISR_Level  level;
>
>     _ISR_Disable( level );
> -    _POSIX_signals_Pending |= mask;
> +    _POSIX_Signals_Pending |= mask;
>     _ISR_Enable( level );
>   }
> diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
> index 0603a7f..29316bd 100644
> --- a/cpukit/posix/src/psignalunblockthread.c
> +++ b/cpukit/posix/src/psignalunblockthread.c
> @@ -34,7 +34,7 @@
>   #include <rtems/posix/time.h>
>   #include <stdio.h>
>
> -bool _POSIX_signals_Unblock_thread(
> +bool _POSIX_Signals_Unblock_thread(
>     Thread_Control  *the_thread,
>     int              signo,
>     siginfo_t       *info
> diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
> index e0f3950..18cf36c 100644
> --- a/cpukit/posix/src/pthreadkill.c
> +++ b/cpukit/posix/src/pthreadkill.c
> @@ -53,13 +53,13 @@ int pthread_kill(
>          *  If sig == 0 then just validate arguments
>          */
>
> -      _POSIX_signals_Add_post_switch_extension();
> +      _POSIX_Signals_Add_post_switch_extension();
>
>         api = the_thread->API_Extensions[ THREAD_API_POSIX ];
>
>         if ( sig ) {
>
> -        if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
> +        if ( _POSIX_Signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
>             _Thread_Enable_dispatch();
>             return 0;
>           }
> @@ -68,7 +68,7 @@ int pthread_kill(
>
>           api->signals_pending |= signo_to_mask( sig );
>
> -        (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
> +        (void) _POSIX_Signals_Unblock_thread( the_thread, sig, NULL );
>
>           if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
>            _Thread_Dispatch_necessary = true;
> diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
> index 3f985bf..6b340ca 100644
> --- a/cpukit/posix/src/pthreadsigmask.c
> +++ b/cpukit/posix/src/pthreadsigmask.c
> @@ -69,7 +69,7 @@ int pthread_sigmask(
>     /* XXX evaluate the new set */
>
>     if ( ~api->signals_blocked &
> -       (api->signals_pending | _POSIX_signals_Pending) ) {
> +       (api->signals_pending | _POSIX_Signals_Pending) ) {
>       _Thread_Dispatch();
>     }
>
> diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
> index cfcc65c..ac2b4c9 100644
> --- a/cpukit/posix/src/sigaction.c
> +++ b/cpukit/posix/src/sigaction.c
> @@ -45,7 +45,7 @@ int sigaction(
>     ISR_Level     level;
>
>     if ( oact )
> -    *oact = _POSIX_signals_Vectors[ sig ];
> +    *oact = _POSIX_Signals_Vectors[ sig ];
>
>     if ( !sig )
>       rtems_set_errno_and_return_minus_one( EINVAL );
> @@ -77,10 +77,10 @@ int sigaction(
>
>       _ISR_Disable( level );
>         if ( act->sa_handler == SIG_DFL ) {
> -        _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
> +        _POSIX_Signals_Vectors[ sig ] = _POSIX_Signals_Default_vectors[ sig ];
>         } else {
> -         _POSIX_signals_Clear_process_signals( sig );
> -         _POSIX_signals_Vectors[ sig ] = *act;
> +         _POSIX_Signals_Clear_process_signals( sig );
> +         _POSIX_Signals_Vectors[ sig ] = *act;
>         }
>       _ISR_Enable( level );
>     }
> diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
> index 44dbe93..dbd6329 100644
> --- a/cpukit/posix/src/sigpending.c
> +++ b/cpukit/posix/src/sigpending.c
> @@ -37,7 +37,7 @@ int sigpending(
>
>     api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
>
> -  *set = api->signals_pending | _POSIX_signals_Pending;
> +  *set = api->signals_pending | _POSIX_Signals_Pending;
>
>     return 0;
>   }
> diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
> index ef8bbdf..92ff89d 100644
> --- a/cpukit/posix/src/sigtimedwait.c
> +++ b/cpukit/posix/src/sigtimedwait.c
> @@ -29,7 +29,7 @@
>   #include <rtems/posix/time.h>
>   #include <rtems/score/isr.h>
>
> -static int _POSIX_signals_Get_lowest(
> +static int _POSIX_Signals_Get_lowest(
>     sigset_t   set
>   )
>   {
> @@ -121,8 +121,8 @@ int sigtimedwait(
>     _ISR_Disable( level );
>     if ( *set & api->signals_pending ) {
>       /* XXX real info later */
> -    the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
> -    _POSIX_signals_Clear_signals(
> +    the_info->si_signo = _POSIX_Signals_Get_lowest( api->signals_pending );
> +    _POSIX_Signals_Clear_signals(
>         api,
>         the_info->si_signo,
>         the_info,
> @@ -138,9 +138,9 @@ int sigtimedwait(
>
>     /* Process pending signals? */
>
> -  if ( *set & _POSIX_signals_Pending ) {
> -    signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
> -    _POSIX_signals_Clear_signals( api, signo, the_info, true, false );
> +  if ( *set & _POSIX_Signals_Pending ) {
> +    signo = _POSIX_Signals_Get_lowest( _POSIX_Signals_Pending );
> +    _POSIX_Signals_Clear_signals( api, signo, the_info, true, false );
>       _ISR_Enable( level );
>
>       the_info->si_signo = signo;
> @@ -152,13 +152,13 @@ int sigtimedwait(
>     the_info->si_signo = -1;
>
>     _Thread_Disable_dispatch();
> -    the_thread->Wait.queue           = &_POSIX_signals_Wait_queue;
> +    the_thread->Wait.queue           = &_POSIX_Signals_Wait_queue;
>       the_thread->Wait.return_code     = EINTR;
>       the_thread->Wait.option          = *set;
>       the_thread->Wait.return_argument = the_info;
> -    _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
> +    _Thread_queue_Enter_critical_section( &_POSIX_Signals_Wait_queue );
>       _ISR_Enable( level );
> -    _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
> +    _Thread_queue_Enqueue( &_POSIX_Signals_Wait_queue, interval );
>     _Thread_Enable_dispatch();
>
>     /*
> @@ -166,7 +166,7 @@ int sigtimedwait(
>      * the signal.
>      */
>
> -  _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
> +  _POSIX_Signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
>
>     /* Set errno only if return code is not EINTR or
>      * if EINTR was caused by a signal being caught, which
> diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
> index e9a4bb8..4a1b176 100644
> --- a/cpukit/posix/src/ualarm.c
> +++ b/cpukit/posix/src/ualarm.c
> @@ -27,10 +27,10 @@
>   #include <rtems/posix/time.h>
>
>   /*
> - *  _POSIX_signals_Ualarm_TSR
> + *  _POSIX_Signals_Ualarm_TSR
>    */
>
> -static void _POSIX_signals_Ualarm_TSR(
> +static void _POSIX_Signals_Ualarm_TSR(
>     Objects_Id      id __attribute__((unused)),
>     void           *argument __attribute__((unused))
>   )
> @@ -44,7 +44,7 @@ static void _POSIX_signals_Ualarm_TSR(
>     /*
>      * If the reset interval is non-zero, reschedule ourselves.
>      */
> -  _Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
> +  _Watchdog_Reset( &_POSIX_Signals_Ualarm_timer );
>   }
>
>   useconds_t ualarm(
> @@ -57,14 +57,14 @@ useconds_t ualarm(
>     Watchdog_Interval ticks;
>     struct timespec   tp;
>
> -  the_timer = &_POSIX_signals_Ualarm_timer;
> +  the_timer = &_POSIX_Signals_Ualarm_timer;
>
>     /*
>      *  Initialize the timer used to implement alarm().
>      */
>
>     if ( !the_timer->routine ) {
> -    _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
> +    _Watchdog_Initialize( the_timer, _POSIX_Signals_Ualarm_TSR, 0, NULL );
>     } else {
>       Watchdog_States state;
>
> diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
> index bd7aabd..c960692 100644
> --- a/cpukit/sapi/src/posixapi.c
> +++ b/cpukit/sapi/src/posixapi.c
> @@ -61,7 +61,7 @@ void _POSIX_API_Initialize(void)
>      */
>     _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
>
> -  _POSIX_signals_Manager_Initialization();
> +  _POSIX_Signals_Manager_initialization();
>     _POSIX_Threads_Manager_initialization();
>     _POSIX_Condition_variables_Manager_initialization();
>     _POSIX_Key_Manager_initialization();
> diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
> index 3cde243..9ed3df1 100644
> --- a/testsuites/psxtests/ChangeLog
> +++ b/testsuites/psxtests/ChangeLog
> @@ -1281,7 +1281,7 @@
>   2009-08-05     Joel Sherrill <joel.sherrill at OARcorp.com>
>
>          * Makefile.am, configure.ac: Add a test to exercise an odd case in
> -       _POSIX_signals_Clear_signals.
> +       _POSIX_Signals_Clear_signals.
>          * psxsignal05/.cvsignore, psxsignal05/Makefile.am, psxsignal05/init.c,
>          psxsignal05/psxsignal05.doc, psxsignal05/psxsignal05.scn: New files.
>
> diff --git a/testsuites/psxtests/psx15/init.c b/testsuites/psxtests/psx15/init.c
> index cc1f01c..14093d7 100644
> --- a/testsuites/psxtests/psx15/init.c
> +++ b/testsuites/psxtests/psx15/init.c
> @@ -28,7 +28,7 @@ rtems_task Init(rtems_task_argument argument);
>
>   /*
>    * This test case shows that post switch extension handlers must cope with
> - * already deleted resources (e.g. _POSIX_signals_Post_switch_extension()).
> + * already deleted resources (e.g. _POSIX_Signals_Post_switch_extension()).
>    * The thread delete extensions run with thread dispatching enabled.  Only the
>    * allocation mutex is locked.
>    */
> diff --git a/testsuites/psxtests/psxsignal01/init.c b/testsuites/psxtests/psxsignal01/init.c
> index 8a85bef..a1dfef8 100644
> --- a/testsuites/psxtests/psxsignal01/init.c
> +++ b/testsuites/psxtests/psxsignal01/init.c
> @@ -28,7 +28,7 @@ rtems_timer_service_routine Signal_duringISR_TSR(
>
>   typedef void (*sighandler_t)(int);
>   sighandler_t signal(int signum, sighandler_t handler);
> -extern void _POSIX_signals_Abnormal_termination_handler( int signo );
> +extern void _POSIX_Signals_Abnormal_termination_handler( int signo );
>
>   volatile int Signal_occurred;
>   volatile int Signal_count;
> @@ -233,7 +233,7 @@ void *POSIX_Init(
>
>     puts("*** Validate unexpected program termination ***");
>     puts( "*** END OF POSIX TEST SIGNAL ***" );
> -  _POSIX_signals_Abnormal_termination_handler( SIGUSR1 );
> +  _POSIX_Signals_Abnormal_termination_handler( SIGUSR1 );
>     status = sleep( 1 );
>
>     puts( "ERROR==> Expected program termination");
> diff --git a/testsuites/psxtests/psxsignal05/init.c b/testsuites/psxtests/psxsignal05/init.c
> index 04c7879..47ddf99 100644
> --- a/testsuites/psxtests/psxsignal05/init.c
> +++ b/testsuites/psxtests/psxsignal05/init.c
> @@ -69,14 +69,14 @@ void *POSIX_Init(
>     sigaction( SIGNAL_TWO, &act, NULL );
>
>     printf(
> -   "Init - _POSIX_signals_Clear_signals when signals pending but\n"
> +   "Init - _POSIX_Signals_Clear_signals when signals pending but\n"
>      "Init -    not queued on SA_SIGINFO configured signal.\n"
>     );
>
>     /* cheat and put signal directly in */
> -  _POSIX_signals_Pending |= signo_to_mask( SIGUSR1 );
> +  _POSIX_Signals_Pending |= signo_to_mask( SIGUSR1 );
>
> -  bc = _POSIX_signals_Clear_signals(
> +  bc = _POSIX_Signals_Clear_signals(
>       _Thread_Executing->API_Extensions[ THREAD_API_POSIX ],
>       SIGNAL_ONE,
>       &info,
> diff --git a/testsuites/psxtests/psxsignal05/psxsignal05.doc b/testsuites/psxtests/psxsignal05/psxsignal05.doc
> index b09b978..74285fd 100644
> --- a/testsuites/psxtests/psxsignal05/psxsignal05.doc
> +++ b/testsuites/psxtests/psxsignal05/psxsignal05.doc
> @@ -19,7 +19,7 @@ directives:
>   concepts:
>
>
> -+ Ensure if _POSIX_signals_Clear_signals is called to clear a process wide
> ++ Ensure if _POSIX_Signals_Clear_signals is called to clear a process wide
>     SA_SIGINFO signal which is pending but there is not a queued SA_SIGINFO
>     structure, then things happen correctly.
>
> diff --git a/testsuites/psxtests/psxsignal05/psxsignal05.scn b/testsuites/psxtests/psxsignal05/psxsignal05.scn
> index 210c515..20509e4 100644
> --- a/testsuites/psxtests/psxsignal05/psxsignal05.scn
> +++ b/testsuites/psxtests/psxsignal05/psxsignal05.scn
> @@ -1,4 +1,4 @@
>   *** POSIX TEST SIGNAL 05 ***
> -Init - _POSIX_signals_Clear_signals when signals pending but
> +Init - _POSIX_Signals_Clear_signals when signals pending but
>   Init -    not queued on SA_SIGINFO configured signal.
>   *** END OF POSIX TEST SIGNAL 05 ***
> diff --git a/testsuites/psxtests/psxualarm/init.c b/testsuites/psxtests/psxualarm/init.c
> index 19c9e44..24ff82d 100644
> --- a/testsuites/psxtests/psxualarm/init.c
> +++ b/testsuites/psxtests/psxualarm/init.c
> @@ -26,7 +26,7 @@ rtems_timer_service_routine Signal_duringISR_TSR(
>
>   typedef void (*sighandler_t)(int);
>   sighandler_t signal(int signum, sighandler_t handler);
> -extern void _POSIX_signals_Abnormal_termination_handler( int signo );
> +extern void _POSIX_Signals_Abnormal_termination_handler( int signo );
>
>   volatile int Signal_occurred;
>   volatile int Signal_count;
> --
> 1.7.10.4
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list