sigqueue: add signal type judgment logic

To determine whether a signal is real-time signal or standard signal, the POSIX standard https://www.man7.org/linux/man-pages/man7/signal.7.html defines a real-time signal between SIGRTMIN  and SIGRTMAX , which can store multiple copies, otherwise only one can be retained.

Signed-off-by: xinhaiteng <xinhaiteng@xiaomi.com>
This commit is contained in:
xinhaiteng 2023-08-21 11:03:56 +08:00 committed by Xiang Xiao
parent 630b5f32a2
commit dbefe37a3a
1 changed files with 8 additions and 1 deletions

View File

@ -193,13 +193,20 @@ static FAR sigpendq_t *nxsig_alloc_pendingsignal(void)
****************************************************************************/
static FAR sigpendq_t *
nxsig_find_pendingsignal(FAR struct task_group_s *group, int signo)
nxsig_find_pendingsignal(FAR struct task_group_s *group, int signo)
{
FAR sigpendq_t *sigpend = NULL;
irqstate_t flags;
DEBUGASSERT(group != NULL);
/* Determining whether a signal is reliable or unreliable */
if (SIGRTMIN <= signo && signo <= SIGRTMAX)
{
return sigpend;
}
/* Pending signals can be added from interrupt level. */
flags = enter_critical_section();