mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-08 02:41:13 +00:00
feat(core): Support pthread using SPIRAM as stack (#4509)
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
parent
6c6447fadb
commit
c6afa131a4
|
@ -110,6 +110,13 @@ os_thread_create_with_prio(korp_tid *tid, thread_start_routine_t start,
|
|||
targ->start = start;
|
||||
targ->arg = arg;
|
||||
|
||||
#ifdef CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM
|
||||
esp_pthread_cfg_t default_config = esp_pthread_get_default_config();
|
||||
|
||||
default_config.stack_alloc_caps = MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM;
|
||||
ESP_ERROR_CHECK(esp_pthread_set_cfg(&default_config));
|
||||
#endif
|
||||
|
||||
if (pthread_create(tid, &tattr, os_thread_wrapper, targ) != 0) {
|
||||
pthread_attr_destroy(&tattr);
|
||||
os_free(targ);
|
||||
|
|
Loading…
Reference in New Issue
Block a user