diff mbox

[PATCHv2,2/3] linux-generic: queue: add queue_is_destroyed internal call

Message ID 1426586009-21519-3-git-send-email-ciprian.barbu@linaro.org
State New
Headers show

Commit Message

Ciprian Barbu March 17, 2015, 9:53 a.m. UTC
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
---
 platform/linux-generic/include/odp_queue_internal.h | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h
index 65aae14..9a0e94f 100644
--- a/platform/linux-generic/include/odp_queue_internal.h
+++ b/platform/linux-generic/include/odp_queue_internal.h
@@ -139,6 +139,15 @@  static inline int queue_is_sched(odp_queue_t handle)
 	return ((queue->s.status == QUEUE_STATUS_SCHED) &&
 		(queue->s.pktin != ODP_PKTIO_INVALID));
 }
+
+static inline int queue_is_destroyed(odp_queue_t handle)
+{
+	queue_entry_t *queue;
+
+	queue = queue_to_qentry(handle);
+
+	return (queue->s.status == QUEUE_STATUS_DESTROYED);
+}
 #ifdef __cplusplus
 }
 #endif