From c6505f3f8df8a5f00197f0eee5cc502e4e59c6a4 Mon Sep 17 00:00:00 2001 From: Ledion Daja Date: Wed, 20 Apr 2022 09:55:21 +0200 Subject: Change mutex and semaphore handling weak functions prototype Changed mutex lock/unlock and semaphore take/give functions to return an int value instead of void. Change-Id: I619327b9e14a3c37697617cbe0cba358102bd6a0 --- include/ethosu_driver.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/ethosu_driver.h') diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h index bf6a578..053b529 100644 --- a/include/ethosu_driver.h +++ b/include/ethosu_driver.h @@ -120,11 +120,16 @@ void ethosu_invalidate_dcache(uint32_t *p, size_t bytes); * ethosu_driver.c. */ void *ethosu_mutex_create(void); -void ethosu_mutex_lock(void *mutex); -void ethosu_mutex_unlock(void *mutex); void *ethosu_semaphore_create(void); -void ethosu_semaphore_take(void *sem); -void ethosu_semaphore_give(void *sem); +/* + * Returns: + * -1 on error + * 0 on success + */ +int ethosu_mutex_lock(void *mutex); +int ethosu_mutex_unlock(void *mutex); +int ethosu_semaphore_take(void *sem); +int ethosu_semaphore_give(void *sem); /* * Callbacks for begin/end of inference. user_data pointer is passed to the -- cgit v1.2.1