mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-23 06:29:10 +00:00
netutils/paho_mqtt: separate library worker stack size
Add CONFIG_LIB_MQTT5_THREAD_STACKSIZE for threads created internally by Paho and use it in Thread.c. Keep CONFIG_UTILS_MQTT5_STACKSIZE scoped to the two utility application tasks. This permits S2OPC to enable MQTT through LIB_MQTT5 without also building unrelated command-line utilities. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: OpenAI Codex:gpt-5
This commit is contained in:
parent
6e56388956
commit
53c234880c
2 changed files with 8 additions and 1 deletions
|
|
@ -9,6 +9,13 @@ config LIB_MQTT5
|
|||
---help---
|
||||
A library for accessing mqtt5 client services through C libraries calls in a simple manner.
|
||||
|
||||
config LIB_MQTT5_THREAD_STACKSIZE
|
||||
int "MQTT library thread stack size"
|
||||
default 16384
|
||||
depends on LIB_MQTT5
|
||||
---help---
|
||||
Stack size used by threads created by the Paho MQTT library.
|
||||
|
||||
config UTILS_MQTT5
|
||||
tristate "Enable mqtt5 tool"
|
||||
depends on LIB_MQTT5
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ index f4d43fb..52f810a 100644
|
|||
#else
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
+ pthread_attr_setstacksize(&attr, CONFIG_UTILS_MQTT5_STACKSIZE);
|
||||
+ pthread_attr_setstacksize(&attr, CONFIG_LIB_MQTT5_THREAD_STACKSIZE);
|
||||
if (pthread_create(&thread, &attr, fn, parameter) != 0)
|
||||
thread = 0;
|
||||
pthread_attr_destroy(&attr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue