mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
Initialise stack in async_context_execute_sync call (#2106)
We need to do this to avoid work_pending being set twice. Fixes #2101
This commit is contained in:
parent
fc37bede32
commit
5202c272cb
2 changed files with 2 additions and 2 deletions
|
|
@ -193,7 +193,7 @@ static void handle_sync_func_call(async_context_t *context, async_when_pending_w
|
|||
uint32_t async_context_freertos_execute_sync(async_context_t *self_base, uint32_t (*func)(void *param), void *param) {
|
||||
async_context_freertos_t *self = (async_context_freertos_t*)self_base;
|
||||
hard_assert(xSemaphoreGetMutexHolder(self->lock_mutex) != xTaskGetCurrentTaskHandle());
|
||||
sync_func_call_t call;
|
||||
sync_func_call_t call = {0};
|
||||
call.worker.do_work = handle_sync_func_call;
|
||||
call.func = func;
|
||||
call.param = param;
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ uint32_t async_context_threadsafe_background_execute_sync(async_context_t *self_
|
|||
#if ASYNC_CONTEXT_THREADSAFE_BACKGROUND_MULTI_CORE
|
||||
if (self_base->core_num != get_core_num()) {
|
||||
hard_assert(!recursive_mutex_enter_count(&self->lock_mutex));
|
||||
sync_func_call_t call;
|
||||
sync_func_call_t call = {0};
|
||||
call.worker.do_work = handle_sync_func_call;
|
||||
call.func = func;
|
||||
call.param = param;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue