mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/psignal.h, posix/src/mqueuecreatesupp.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalclearsignals.c: Minor rework to ease coverage analysis.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* posix/include/rtems/posix/psignal.h, posix/src/mqueuecreatesupp.c,
|
||||||
|
posix/src/psignalclearprocesssignals.c,
|
||||||
|
posix/src/psignalclearsignals.c: Minor rework to ease coverage
|
||||||
|
analysis.
|
||||||
|
|
||||||
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* rtems/include/rtems/rtems/intr.h, rtems/src/intrcatch.c: Disable
|
* rtems/include/rtems/rtems/intr.h, rtems/src/intrcatch.c: Disable
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void _POSIX_signals_Set_process_signals(
|
|||||||
);
|
);
|
||||||
|
|
||||||
void _POSIX_signals_Clear_process_signals(
|
void _POSIX_signals_Clear_process_signals(
|
||||||
sigset_t mask
|
int signo
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -97,10 +97,12 @@ int _POSIX_Message_queue_Create_support(
|
|||||||
}
|
}
|
||||||
|
|
||||||
the_mq = _POSIX_Message_queue_Allocate();
|
the_mq = _POSIX_Message_queue_Allocate();
|
||||||
if ( !the_mq ) {
|
#if defined(RTEMS_DEBUG)
|
||||||
_Thread_Enable_dispatch();
|
if ( !the_mq ) {
|
||||||
rtems_set_errno_and_return_minus_one( ENFILE );
|
_Thread_Enable_dispatch();
|
||||||
}
|
rtems_set_errno_and_return_minus_one( ENFILE );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_mq->process_shared = pshared;
|
the_mq->process_shared = pshared;
|
||||||
the_mq->named = true;
|
the_mq->named = true;
|
||||||
|
|||||||
@@ -35,14 +35,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void _POSIX_signals_Clear_process_signals(
|
void _POSIX_signals_Clear_process_signals(
|
||||||
sigset_t mask
|
int signo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
sigset_t mask;
|
||||||
|
bool clear_signal;
|
||||||
|
|
||||||
|
clear_signal = true;
|
||||||
|
mask = signo_to_mask( signo );
|
||||||
|
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable( level );
|
_ISR_Disable( level );
|
||||||
_POSIX_signals_Pending &= ~mask;
|
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
|
||||||
if ( !_POSIX_signals_Pending )
|
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
|
||||||
_Thread_Do_post_task_switch_extension--;
|
clear_signal = false;
|
||||||
|
}
|
||||||
|
if ( clear_signal ) {
|
||||||
|
_POSIX_signals_Pending &= ~mask;
|
||||||
|
if ( !_POSIX_signals_Pending )
|
||||||
|
_Thread_Do_post_task_switch_extension--;
|
||||||
|
}
|
||||||
_ISR_Enable( level );
|
_ISR_Enable( level );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,7 @@ bool _POSIX_signals_Clear_signals(
|
|||||||
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
|
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
|
||||||
psiginfo = (POSIX_signals_Siginfo_node *)
|
psiginfo = (POSIX_signals_Siginfo_node *)
|
||||||
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
|
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
|
||||||
if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
|
_POSIX_signals_Clear_process_signals( signo );
|
||||||
_POSIX_signals_Clear_process_signals( mask );
|
|
||||||
if ( psiginfo ) {
|
if ( psiginfo ) {
|
||||||
*info = psiginfo->Info;
|
*info = psiginfo->Info;
|
||||||
_Chain_Append_unprotected(
|
_Chain_Append_unprotected(
|
||||||
@@ -80,8 +79,8 @@ bool _POSIX_signals_Clear_signals(
|
|||||||
);
|
);
|
||||||
} else
|
} else
|
||||||
do_callout = false;
|
do_callout = false;
|
||||||
} else
|
}
|
||||||
_POSIX_signals_Clear_process_signals( mask );
|
_POSIX_signals_Clear_process_signals( signo );
|
||||||
do_callout = true;
|
do_callout = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user