sched/signal: Make the pre-allocated irq actions configurable
the action can't be dynamically allocated in any irq handler so it's important to let the user extend the number as needed Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Id30c5d93003e63514c24f2ca0df2f634c4c63c5f
This commit is contained in:
parent
c079760777
commit
deef880dae
@ -1309,6 +1309,12 @@ endmenu # RTOS hooks
|
||||
|
||||
menu "Signal Configuration"
|
||||
|
||||
config SIG_PREALLOC_IRQ_ACTIONS
|
||||
int "Number of pre-allocated irq actions"
|
||||
default 8
|
||||
---help---
|
||||
The number of pre-allocated irq action structures.
|
||||
|
||||
config SIG_EVTHREAD
|
||||
bool "Support SIGEV_THHREAD"
|
||||
default n
|
||||
|
@ -230,7 +230,7 @@ void nxsig_initialize(void)
|
||||
|
||||
g_sigpendingirqactionalloc =
|
||||
nxsig_alloc_block(&g_sigpendingirqaction,
|
||||
NUM_PENDING_INT_ACTIONS,
|
||||
CONFIG_SIG_PREALLOC_IRQ_ACTIONS,
|
||||
SIG_ALLOC_IRQ);
|
||||
DEBUGASSERT(g_sigpendingirqactionalloc != NULL);
|
||||
|
||||
@ -242,7 +242,7 @@ void nxsig_initialize(void)
|
||||
|
||||
g_sigpendingirqsignalalloc =
|
||||
nxsig_alloc_pendingsignalblock(&g_sigpendingirqsignal,
|
||||
NUM_INT_SIGNALS_PENDING,
|
||||
CONFIG_SIG_PREALLOC_IRQ_ACTIONS,
|
||||
SIG_ALLOC_IRQ);
|
||||
DEBUGASSERT(g_sigpendingirqsignalalloc != NULL);
|
||||
}
|
||||
|
@ -60,9 +60,7 @@
|
||||
|
||||
#define NUM_SIGNAL_ACTIONS 4
|
||||
#define NUM_PENDING_ACTIONS 4
|
||||
#define NUM_PENDING_INT_ACTIONS 8
|
||||
#define NUM_SIGNALS_PENDING 4
|
||||
#define NUM_INT_SIGNALS_PENDING 8
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
|
Loading…
Reference in New Issue
Block a user