You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2024/05/27 15:44:00 UTC

Re: [PR] sched/signal: reclaim sigaction blocks [nuttx]

xiaoxiang781216 commented on code in PR #12406:
URL: https://github.com/apache/nuttx/pull/12406#discussion_r1616207706


##########
sched/signal/sig_action.c:
##########
@@ -407,11 +447,65 @@ int sigaction(int signo, FAR const struct sigaction *act,
 
 void nxsig_release_action(FAR sigactq_t *sigact)
 {
+  FAR sq_queue_t * const list = &g_sigfreeaction;
+  FAR sigactq_t *prev;
+  FAR sigactq_t *next;
   irqstate_t flags;
+  int i;
 
-  /* Just put it back on the free list */
+  /* Put back to the free list */
+
+  nxsig_add_free(sigact);

Review Comment:
   what's benefit to reclaim the signal action pool? if it's important to safe the memory, it's simpler and fast to alloc/free one action from heap.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org