diff mbox

[API-NEXT,PATCHv9,10/13] api: schedule: add APIs for order copying and sustaining

Message ID 1438948036-31868-11-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Aug. 7, 2015, 11:47 a.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 include/odp/api/schedule.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
diff mbox

Patch

diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h
index f27bf78..61d3b16 100644
--- a/include/odp/api/schedule.h
+++ b/include/odp/api/schedule.h
@@ -174,6 +174,57 @@  void odp_schedule_release_atomic(void);
 int odp_schedule_release_ordered(odp_event_t ev);
 
 /**
+ * Copy order from one event to another
+ *
+ * This call copies the order associated with an event originating from an
+ * ordered queue to another event.  The target event must not have an
+ * associated ordering at input to the call. If the target is ordered, the
+ * prior ordering must first be released by an odp_schedule_release_ordered()
+ * call. Successfuly copying an order implicitly sets the order sustain
+ * attribute for the src_event as if odp_schedule_order_sustain() were called
+ * for it.
+ *
+ * @param src_event Event whose ordering is to be copied
+ * @param dst_event Event to receive the same ordering as src_event.
+ *
+ * @retval 0  Success
+ * @retval <0 Failure.  Order not copied.
+ */
+int odp_schedule_order_copy(odp_event_t src_event, odp_event_t dst_event);
+
+/*
+ * Get order sustain attribute
+ *
+ * Retrieve the order sustain attribute associated with an event. An event
+ * normally consumes its order when enqueued.  An event that sustains order
+ * does not consume its order when enqueued, permitting multiple events to
+ * be sequenced in the same relative order.
+ *
+ * @param ev  Event
+ *
+ * @retval 0 Event will not sustain order when queued
+ * @retval 1 Event will sustain order when queued
+ * @retval <0 Event has no associated ordering
+ */
+int odp_schedule_order_sustain(odp_event_t ev);
+
+/*
+ * Set order sustain attribute
+ *
+ * Set the order sustain attribute associated with an event. An event
+ * normally consumes its order when enqueued. An event that sustains order
+ * does not consume its order when enqueued, permitting multiple events to
+ * be sequenced in the same relative order.
+ *
+ * @param ev      Event
+ * @param sustain Value to be set (0 or 1)
+ *
+ * @retval 0  Success
+ * @retval <0 Failure.  Event not ordered or invalid sustain value specified.
+ */
+int odp_schedule_order_sustain_set(odp_event_t ev, odp_bool_t sustain);
+
+/**
  * Prefetch events for next schedule call
  *
  * Hint the scheduler that application is about to finish processing the current