diff options
Diffstat (limited to 'applications/freertos/main.cpp')
-rw-r--r-- | applications/freertos/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/applications/freertos/main.cpp b/applications/freertos/main.cpp index 6ba369b..2dbc3a8 100644 --- a/applications/freertos/main.cpp +++ b/applications/freertos/main.cpp @@ -1,6 +1,5 @@ /* * SPDX-FileCopyrightText: Copyright 2019-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> - * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may @@ -174,10 +173,9 @@ void *ethosu_semaphore_create(void) { return (void *)sem; } -int ethosu_semaphore_take(void *sem) { +int ethosu_semaphore_take(void *sem, uint64_t timeout) { SemaphoreHandle_t handle = reinterpret_cast<SemaphoreHandle_t>(sem); - if (xSemaphoreTake(handle, portMAX_DELAY) != pdTRUE) { - printf("Error: Failed to take semaphore.\n"); + if (xSemaphoreTake(handle, (TickType_t)timeout) != pdTRUE) { return -1; } return 0; |