From 3479622fec9a38f1c145af51704eb8b16803eafe Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 24 Nov 2023 18:33:01 +0800 Subject: [PATCH] serial: use nxsig_tgkill instead of nxsig_kill Caused nxsig_tgkill is for the one thread, nxsig_kill for the group Signed-off-by: ligd --- drivers/serial/serial_dma.c | 2 +- drivers/serial/serial_io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial_dma.c b/drivers/serial/serial_dma.c index 8572a47fd1..87d0bcf5e9 100644 --- a/drivers/serial/serial_dma.c +++ b/drivers/serial/serial_dma.c @@ -352,7 +352,7 @@ void uart_recvchars_done(FAR uart_dev_t *dev) if (signo != 0) { - nxsig_kill(dev->pid, signo); + nxsig_tgkill(-1, dev->pid, signo); } #endif } diff --git a/drivers/serial/serial_io.c b/drivers/serial/serial_io.c index 55160cee35..8a75ae0559 100644 --- a/drivers/serial/serial_io.c +++ b/drivers/serial/serial_io.c @@ -309,7 +309,7 @@ void uart_recvchars(FAR uart_dev_t *dev) if (signo != 0) { - nxsig_kill(dev->pid, signo); + nxsig_tgkill(-1, dev->pid, signo); } #endif }