diff mbox series

[API-NEXT,v10,2/4] api: schedule: add schedule order unlock lock api

Message ID 1505300412-17241-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v10,1/4] api: schedule: remove support for nested ordered lock | expand

Commit Message

Github ODP bot Sept. 13, 2017, 11 a.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


Adds odp_schedule_order_unlock_lock() api. This api combines schedule
order unlock and lock into a single api for performance optimization in HW.

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

---
/** Email created from pull request 160 (bala-manoharan:api_sched_order_lock)
 ** https://github.com/Linaro/odp/pull/160
 ** Patch: https://github.com/Linaro/odp/pull/160.patch
 ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1
 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd
 **/
 include/odp/api/spec/schedule.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h
index e2abf990b..b42a0db14 100644
--- a/include/odp/api/spec/schedule.h
+++ b/include/odp/api/spec/schedule.h
@@ -371,6 +371,27 @@  void odp_schedule_order_lock(uint32_t lock_index);
 void odp_schedule_order_unlock(uint32_t lock_index);
 
 /**
+ * Release existing ordered context lock and acquire a new lock
+ *
+ * This call is valid only when holding an ordered synchronization context.
+ * Release a previously locked ordered context lock and acquire a new ordered
+ * context lock. The operation is equivalent to application calling first
+ * odp_schedule_order_unlock(unlock_index) and then
+ * odp_schedule_order_lock(lock_index). The same constraints apply to this call
+ * similar to calling these two calls in sequence.
+ *
+ * @param unlock_index	Index of the acquired ordered lock in the current
+ *			context to be released.
+ * @param lock_index	Index of the ordered lock in the current context to be
+ *			acquired. Must be in the range
+ *			0...odp_queue_lock_count() - 1.
+ *
+ * @see odp_schedule_order_lock(), odp_schedule_order_unlock()
+ *
+ */
+void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index);
+
+/**
  * @}
  */