sigact: get free sigact from freelist always successful

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-12-23 10:31:30 +08:00 committed by Xiang Xiao
parent 40d9e10f37
commit 37ef22b106

View File

@ -101,7 +101,7 @@ static FAR sigactq_t *nxsig_alloc_action(void)
/* Check if we got one. */
if (!sigact)
while (!sigact)
{
/* Add another block of signal actions to the list */
@ -112,7 +112,6 @@ static FAR sigactq_t *nxsig_alloc_action(void)
flags = spin_lock_irqsave(&g_sigaction_spin);
sigact = (FAR sigactq_t *)sq_remfirst(&g_sigfreeaction);
spin_unlock_irqrestore(&g_sigaction_spin, flags);
DEBUGASSERT(sigact);
}
return sigact;