diff mbox

[PATCHv2,1/2] api: queue: add odp_queue_destroy()

Message ID 1417535248-19398-2-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit 051fd8d5eb4d07b60f792d78ba6b03a4f9ee9379
Headers show

Commit Message

Taras Kondratiuk Dec. 2, 2014, 3:47 p.m. UTC
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 platform/linux-generic/include/api/odp_queue.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Maxim Uvarov Dec. 16, 2014, 8:42 a.m. UTC | #1
Merged only this first patch because second one needs more rework.

Thanks,
Maxim.

On 12/12/2014 11:54 AM, Savolainen, Petri (NSN - FI/Espoo) wrote:
> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
>
>> -----Original Message-----
>> From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp-
>> bounces@lists.linaro.org] On Behalf Of ext Taras Kondratiuk
>> Sent: Tuesday, December 02, 2014 5:47 PM
>> To: lng-odp@lists.linaro.org
>> Subject: [lng-odp] [PATCHv2 1/2] api: queue: add odp_queue_destroy()
>>
>> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>> ---
>>   platform/linux-generic/include/api/odp_queue.h |   14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/platform/linux-generic/include/api/odp_queue.h
>> b/platform/linux-generic/include/api/odp_queue.h
>> index b8ac4bb..b994c20 100644
>> --- a/platform/linux-generic/include/api/odp_queue.h
>> +++ b/platform/linux-generic/include/api/odp_queue.h
>> @@ -124,6 +124,20 @@ odp_queue_t odp_queue_create(const char *name,
>> odp_queue_type_t type,
>>   			     odp_queue_param_t *param);
>>
>>   /**
>> + * Destroy ODP queue
>> + *
>> + * Destroys ODP queue. The queue must be empty and detached from other
>> + * ODP API (crypto, pktio, etc). Application must ensure that no other
>> + * operations on this queue are invoked in parallel. Otherwise behavior
>> + * is undefined.
>> + *
>> + * @param queue    Queue handle
>> + *
>> + * @return 0 if successful
>> + */
>> +int odp_queue_destroy(odp_queue_t queue);
>> +
>> +/**
>>    * Find a queue by name
>>    *
>>    * @param name    Queue name
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_queue.h b/platform/linux-generic/include/api/odp_queue.h
index b8ac4bb..b994c20 100644
--- a/platform/linux-generic/include/api/odp_queue.h
+++ b/platform/linux-generic/include/api/odp_queue.h
@@ -124,6 +124,20 @@  odp_queue_t odp_queue_create(const char *name, odp_queue_type_t type,
 			     odp_queue_param_t *param);
 
 /**
+ * Destroy ODP queue
+ *
+ * Destroys ODP queue. The queue must be empty and detached from other
+ * ODP API (crypto, pktio, etc). Application must ensure that no other
+ * operations on this queue are invoked in parallel. Otherwise behavior
+ * is undefined.
+ *
+ * @param queue    Queue handle
+ *
+ * @return 0 if successful
+ */
+int odp_queue_destroy(odp_queue_t queue);
+
+/**
  * Find a queue by name
  *
  * @param name    Queue name