fix(openthread): remove the empty task for openthread tasklets

This commit is contained in:
Xu Si Yu
2024-05-29 20:52:10 +08:00
parent a946d0cddf
commit 494e0ab170
8 changed files with 65 additions and 69 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -15,6 +15,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "freertos/queue.h"
#include "openthread/tasklet.h"
static QueueHandle_t s_task_queue = NULL;
static int s_task_queue_event_fd = -1;
@@ -37,6 +38,14 @@ esp_err_t esp_openthread_task_queue_init(const esp_openthread_platform_config_t
&esp_openthread_task_queue_process, task_queue_workflow);
}
void otTaskletsSignalPending(otInstance *aInstance)
{
uint64_t val = 1;
ssize_t ret;
ret = write(s_task_queue_event_fd, &val, sizeof(val));
assert(ret == sizeof(val));
}
esp_err_t IRAM_ATTR esp_openthread_task_queue_post(esp_openthread_task_t task, void *arg)
{
task_storage_t task_storage = {