diff mbox series

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

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

Commit Message

Github ODP bot Sept. 13, 2017, 8 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: 9d7a98815f8025c2e47e0f4b5222a59feb4e7554
 **/
 include/odp/api/spec/schedule.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h
index e2abf990..d305ce3b 100644
--- a/include/odp/api/spec/schedule.h
+++ b/include/odp/api/spec/schedule.h
@@ -371,6 +371,31 @@  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. This call is valid only when there is a single ordered context
+ * lock active. Results are undefined if this call is made when multiple ordered
+ * context locks are acquired in nested fashion.
+ * This call does not release the existing ordered context and only switches
+ * from one ordered lock to another ordered lock within the same ordered
+ * context.
+ *
+ * @param unlock_index	Index of the acquired ordered lock in the current
+ *			context to be released. Results are undefined if the
+ *			ordered lock with the given unlock_index is not held by
+ *			this ordered context.
+ * @param lock_index	Index of the ordered lock in the current context to be
+ *			acquired. Previously acquired ordered lock is released.
+ *			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);
+
+/**
  * @}
  */