Update TODO list regarding non-queuing of signal actions; Add comments in code at areas where the issue applies.
This commit is contained in:
parent
1bbcd1ad96
commit
b1001b4e50
18
TODO
18
TODO
@ -13,7 +13,7 @@ nuttx/:
|
||||
(5) SMP
|
||||
(1) Memory Management (mm/)
|
||||
(0) Power Management (drivers/pm)
|
||||
(3) Signals (sched/signal, arch/)
|
||||
(4) Signals (sched/signal, arch/)
|
||||
(2) pthreads (sched/pthread)
|
||||
(0) Message Queues (sched/mqueue)
|
||||
(10) Kernel/Protected Build
|
||||
@ -763,6 +763,22 @@ o Signals (sched/signal, arch/)
|
||||
Status: Open
|
||||
Priority: Low. Even if there are only 31 usable signals, that is still a lot.
|
||||
|
||||
Title: NO QUEUING of SIGNAL ACTIONS
|
||||
Description: In the architecture specific implemenation of struct xcptcontext,
|
||||
there are fields used by signal handling logic to pass the state
|
||||
information needed to dispatch signal actions to the appropriate
|
||||
handler.
|
||||
|
||||
There is only one copy of this state information in the
|
||||
implementations of struct xcptcontext and, as a consequence,
|
||||
if there is a signal handler executing on a thread, then addition
|
||||
signal actions will be lost until that signal handler completes
|
||||
and releases those resources.
|
||||
Status: Open
|
||||
Priority: Low. This design flaw has been around for ages and no one has yet
|
||||
complained about it. Apparently the visibility of the problem is
|
||||
very low.
|
||||
|
||||
o pthreads (sched/pthreads)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -138,15 +138,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and CPSR used during
|
||||
* signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
|
@ -173,6 +173,11 @@ struct xcptcontext
|
||||
|
||||
/* These are saved copies of LR, PRIMASK, and xPSR used during
|
||||
* signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
|
@ -229,14 +229,20 @@ struct xcpt_syscall_s
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and CPSR used during signal processing. */
|
||||
/* These are saved copies of LR and CPSR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_cpsr;
|
||||
|
@ -128,6 +128,11 @@ struct xcptcontext
|
||||
|
||||
/* These are saved copies of LR, PRIMASK, and xPSR used during
|
||||
* signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
|
@ -229,14 +229,20 @@ struct xcpt_syscall_s
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and CPSR used during signal processing. */
|
||||
/* These are saved copies of LR and CPSR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_cpsr;
|
||||
|
@ -106,14 +106,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of PC and SR used during signal processing.*/
|
||||
/* These are saved copies of PC and SR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint8_t saved_pc1;
|
||||
uint8_t saved_pc0;
|
||||
|
@ -107,14 +107,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of PC and SR used during signal processing.*/
|
||||
/* These are saved copies of PC and SR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_sr;
|
||||
|
@ -338,6 +338,11 @@ struct xcptcontext
|
||||
|
||||
/* These additional register save locations are used to implement the
|
||||
* signal delivery trampoline.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_epc; /* Trampoline PC */
|
||||
|
@ -204,6 +204,11 @@ struct xcptcontext
|
||||
|
||||
/* These additional register save locations are used to implement the
|
||||
* signal delivery trampoline.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_epc; /* Trampoline PC */
|
||||
|
@ -171,15 +171,20 @@ struct xcptcontext
|
||||
|
||||
uint32_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and CPSR used during
|
||||
* signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
|
@ -242,14 +242,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and SR used during signal processing. */
|
||||
/* These are saved copies of LR and SR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint8_t saved_pc[2];
|
||||
uint8_t saved_flg;
|
||||
|
@ -459,14 +459,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and SR used during signal processing. */
|
||||
/* These are saved copies of LR and SR used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_sr;
|
||||
|
@ -312,6 +312,11 @@ struct xcptcontext
|
||||
|
||||
/* These additional register save locations are used to implement the
|
||||
* signal delivery trampoline.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_epc; /* Trampoline PC */
|
||||
|
@ -166,15 +166,20 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of instruction pointer and EFLAGS used during
|
||||
* signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_eip;
|
||||
|
@ -146,14 +146,20 @@
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of registers used during signal processing. */
|
||||
/* These are saved copies of registers used during signal processing.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_ps;
|
||||
|
@ -178,14 +178,20 @@ struct xcptcontext
|
||||
|
||||
uint16_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
/* The following retains that state during signal execution.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint32_t saved_pc; /* Saved return address */
|
||||
uint16_t saved_i; /* Saved interrupt state */
|
||||
|
@ -213,14 +213,20 @@ struct xcptcontext
|
||||
|
||||
chipreg_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
/* The following retains that state during signal execution
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
chipreg_t saved_pc; /* Saved return address */
|
||||
chipreg_t saved_i; /* Saved interrupt state */
|
||||
|
@ -186,14 +186,20 @@ struct xcptcontext
|
||||
|
||||
chipreg_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
/* The following retains that state during signal execution
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint16_t saved_pc; /* Saved return address */
|
||||
uint16_t saved_i; /* Saved interrupt state */
|
||||
|
@ -319,17 +319,23 @@ struct xcptcontext
|
||||
|
||||
chipreg_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
/* The following retains that state during signal execution
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint16_t saved_pc; /* Saved return address */
|
||||
uint16_t saved_irqctl; /* Saved interrupt state */
|
||||
uint16_t saved_pc; /* Saved return address */
|
||||
uint16_t saved_irqctl; /* Saved interrupt state */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
@ -103,14 +103,20 @@ struct xcptcontext
|
||||
|
||||
chipreg_t regs[XCPTCONTEXT_REGS];
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
/* The following retains that state during signal execution.
|
||||
*
|
||||
* REVISIT: Because there is only one copy of these save areas,
|
||||
* only a single signal handler can be active. This precludes
|
||||
* queuing of signal actions. As a result, signals received while
|
||||
* another signal handler is executing will be ignored!
|
||||
*/
|
||||
|
||||
uint16_t saved_pc; /* Saved return address */
|
||||
uint16_t saved_i; /* Saved interrupt state */
|
||||
|
Loading…
Reference in New Issue
Block a user