Squashed commit of the following:

drivers/serial/Kconfig:  It is no longer necessary to restrict Ctrl-C handling to the FLAT build

    sched/signal:  Add a new configuration option to select signal default actions, separate handling of signal default actions from both task startup logic and from the serial TTY Ctrl-C logic.  Add a signal set in the group structure to keep track of what signals have been set to the default action.  In dispatching signals in PROTECTED or KERNEL mode, use this signal set to determine if the default signal handler is attached and dispatch the signal in kernel mode for the default actions.
This commit is contained in:
Gregory Nutt
2018-08-27 11:40:09 -06:00
parent 798922b9c6
commit c0d234a474
12 changed files with 372 additions and 89 deletions
+5 -5
View File
@@ -60,14 +60,14 @@
*
************************************************************************************/
#ifdef CONFIG_SIG_SIGKILL
#ifdef CONFIG_TTY_SIGKILL
static bool uart_check_sigkill(const char *buf, size_t size)
{
size_t i;
for (i = 0; i < size; i++)
{
if (buf[i] == CONFIG_SERIAL_SIGKILL_CHAR)
if (buf[i] == CONFIG_TTY_SIGKILL_CHAR)
{
return true;
}
@@ -88,7 +88,7 @@ static bool uart_check_sigkill(const char *buf, size_t size)
*
************************************************************************************/
#ifdef CONFIG_SIG_SIGKILL
#ifdef CONFIG_TTY_SIGKILL
static bool uart_recvchars_sigkill(FAR uart_dev_t *dev)
{
FAR struct uart_dmaxfer_s *xfer = &dev->dmarx;
@@ -324,7 +324,7 @@ void uart_recvchars_done(FAR uart_dev_t *dev)
FAR struct uart_dmaxfer_s *xfer = &dev->dmarx;
FAR struct uart_buffer_s *rxbuf = &dev->recv;
size_t nbytes = xfer->nbytes;
#ifdef CONFIG_SIG_SIGKILL
#ifdef CONFIG_TTY_SIGKILL
bool needkill = false;
/* Check if the SIGKILL character is anywhere in the newly received DMA buffer. */
@@ -350,7 +350,7 @@ void uart_recvchars_done(FAR uart_dev_t *dev)
uart_datareceived(dev);
}
#ifdef CONFIG_SIG_SIGKILL
#ifdef CONFIG_TTY_SIGKILL
/* Send the SIGKILL signal if needed */
if (needkill)