summaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_received.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/sig_received.c')
-rw-r--r--nuttx/sched/sig_received.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/nuttx/sched/sig_received.c b/nuttx/sched/sig_received.c
index 56f7f1dea..1aa76c900 100644
--- a/nuttx/sched/sig_received.c
+++ b/nuttx/sched/sig_received.c
@@ -178,12 +178,15 @@ static FAR sigpendq_t *sig_allocatependingsignal(void)
/* Try to get the pending signal structure from the free list */
sigpend = (FAR sigpendq_t*)sq_remfirst(&g_sigpendingsignal);
+ if (!sigpend)
+ {
+ /* If no pending signal structure is available in the free list,
+ * then try the special list of structures reserved for
+ * interrupt handlers
+ */
- /* If so, then try the special list of structures reserved for
- * interrupt handlers
- */
-
- sigpend = (FAR sigpendq_t*)sq_remfirst(&g_sigpendingirqsignal);
+ sigpend = (FAR sigpendq_t*)sq_remfirst(&g_sigpendingirqsignal);
+ }
}
/* If we were not called from an interrupt handler, then we are