aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLedion Daja <ledion.daja@arm.com>2022-04-20 09:55:21 +0200
committerLedion Daja <ledion.daja@arm.com>2022-04-20 13:39:22 +0200
commitc6505f3f8df8a5f00197f0eee5cc502e4e59c6a4 (patch)
tree9bc2087f03ad65719e7eb8b99ed4c5d6620da582 /include
parent2f9c333a82c53a829c3d6dae204f246ba0b7a74e (diff)
downloadethos-u-core-driver-c6505f3f8df8a5f00197f0eee5cc502e4e59c6a4.tar.gz
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
Diffstat (limited to 'include')
-rw-r--r--include/ethosu_driver.h13
1 files changed, 9 insertions, 4 deletions
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