diff mbox

[API-NEXT,1/2] api: queue: rename queue context get/set for consistency

Message ID 1438016566-13800-1-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 21d6367555a026481ff69e35ff6a3890469efd46
Headers show

Commit Message

Stuart Haslam July 27, 2015, 5:02 p.m. UTC
Rename queue context APIs to make them consistent with the naming of
other getter and setter APIs.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 include/odp/api/queue.h            | 4 ++--
 platform/linux-generic/odp_queue.c | 4 ++--
 test/validation/queue/queue.c      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Bill Fischofer July 27, 2015, 9:45 p.m. UTC | #1
On Mon, Jul 27, 2015 at 12:02 PM, Stuart Haslam <stuart.haslam@linaro.org>
wrote:

> Rename queue context APIs to make them consistent with the naming of
> other getter and setter APIs.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  include/odp/api/queue.h            | 4 ++--
>  platform/linux-generic/odp_queue.c | 4 ++--
>  test/validation/queue/queue.c      | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h
> index 61d0b31..4d85930 100644
> --- a/include/odp/api/queue.h
> +++ b/include/odp/api/queue.h
> @@ -133,7 +133,7 @@ odp_queue_t odp_queue_lookup(const char *name);
>   * @retval 0 on success
>   * @retval <0 on failure
>   */
> -int odp_queue_set_context(odp_queue_t queue, void *context);
> +int odp_queue_context_set(odp_queue_t queue, void *context);
>
>  /**
>   * Get queue context
> @@ -143,7 +143,7 @@ int odp_queue_set_context(odp_queue_t queue, void
> *context);
>   * @return pointer to the queue context
>   * @retval NULL on failure
>   */
> -void *odp_queue_get_context(odp_queue_t queue);
> +void *odp_queue_context(odp_queue_t queue);
>
>  /**
>   * Queue enqueue
> diff --git a/platform/linux-generic/odp_queue.c
> b/platform/linux-generic/odp_queue.c
> index aa8b99f..4a0df11 100644
> --- a/platform/linux-generic/odp_queue.c
> +++ b/platform/linux-generic/odp_queue.c
> @@ -286,7 +286,7 @@ int odp_queue_destroy(odp_queue_t handle)
>         return 0;
>  }
>
> -int odp_queue_set_context(odp_queue_t handle, void *context)
> +int odp_queue_context_set(odp_queue_t handle, void *context)
>  {
>         queue_entry_t *queue;
>         queue = queue_to_qentry(handle);
> @@ -296,7 +296,7 @@ int odp_queue_set_context(odp_queue_t handle, void
> *context)
>         return 0;
>  }
>
> -void *odp_queue_get_context(odp_queue_t handle)
> +void *odp_queue_context(odp_queue_t handle)
>  {
>         queue_entry_t *queue;
>         queue = queue_to_qentry(handle);
> diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c
> index 253b4c6..a0cdf0f 100644
> --- a/test/validation/queue/queue.c
> +++ b/test/validation/queue/queue.c
> @@ -73,9 +73,9 @@ static void queue_test_sunnydays(void)
>         CU_ASSERT_EQUAL(ODP_SCHED_PRIO_LOWEST,
> odp_queue_sched_prio(queue_id));
>         CU_ASSERT_EQUAL(ODP_SCHED_SYNC_NONE,
> odp_queue_sched_type(queue_id));
>
> -       CU_ASSERT(0 == odp_queue_set_context(queue_id, &queue_contest));
> +       CU_ASSERT(0 == odp_queue_context_set(queue_id, &queue_contest));
>
> -       prtn = odp_queue_get_context(queue_id);
> +       prtn = odp_queue_context(queue_id);
>         CU_ASSERT(&queue_contest == (int *)prtn);
>
>         msg_pool = odp_pool_lookup("msg_pool");
> --
> 2.1.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov July 28, 2015, 11:02 a.m. UTC | #2
Merged,
Maxim.

On 07/27/15 20:02, Stuart Haslam wrote:
> Rename queue context APIs to make them consistent with the naming of
> other getter and setter APIs.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> ---
>   include/odp/api/queue.h            | 4 ++--
>   platform/linux-generic/odp_queue.c | 4 ++--
>   test/validation/queue/queue.c      | 4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h
> index 61d0b31..4d85930 100644
> --- a/include/odp/api/queue.h
> +++ b/include/odp/api/queue.h
> @@ -133,7 +133,7 @@ odp_queue_t odp_queue_lookup(const char *name);
>    * @retval 0 on success
>    * @retval <0 on failure
>    */
> -int odp_queue_set_context(odp_queue_t queue, void *context);
> +int odp_queue_context_set(odp_queue_t queue, void *context);
>   
>   /**
>    * Get queue context
> @@ -143,7 +143,7 @@ int odp_queue_set_context(odp_queue_t queue, void *context);
>    * @return pointer to the queue context
>    * @retval NULL on failure
>    */
> -void *odp_queue_get_context(odp_queue_t queue);
> +void *odp_queue_context(odp_queue_t queue);
>   
>   /**
>    * Queue enqueue
> diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
> index aa8b99f..4a0df11 100644
> --- a/platform/linux-generic/odp_queue.c
> +++ b/platform/linux-generic/odp_queue.c
> @@ -286,7 +286,7 @@ int odp_queue_destroy(odp_queue_t handle)
>   	return 0;
>   }
>   
> -int odp_queue_set_context(odp_queue_t handle, void *context)
> +int odp_queue_context_set(odp_queue_t handle, void *context)
>   {
>   	queue_entry_t *queue;
>   	queue = queue_to_qentry(handle);
> @@ -296,7 +296,7 @@ int odp_queue_set_context(odp_queue_t handle, void *context)
>   	return 0;
>   }
>   
> -void *odp_queue_get_context(odp_queue_t handle)
> +void *odp_queue_context(odp_queue_t handle)
>   {
>   	queue_entry_t *queue;
>   	queue = queue_to_qentry(handle);
> diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c
> index 253b4c6..a0cdf0f 100644
> --- a/test/validation/queue/queue.c
> +++ b/test/validation/queue/queue.c
> @@ -73,9 +73,9 @@ static void queue_test_sunnydays(void)
>   	CU_ASSERT_EQUAL(ODP_SCHED_PRIO_LOWEST, odp_queue_sched_prio(queue_id));
>   	CU_ASSERT_EQUAL(ODP_SCHED_SYNC_NONE, odp_queue_sched_type(queue_id));
>   
> -	CU_ASSERT(0 == odp_queue_set_context(queue_id, &queue_contest));
> +	CU_ASSERT(0 == odp_queue_context_set(queue_id, &queue_contest));
>   
> -	prtn = odp_queue_get_context(queue_id);
> +	prtn = odp_queue_context(queue_id);
>   	CU_ASSERT(&queue_contest == (int *)prtn);
>   
>   	msg_pool = odp_pool_lookup("msg_pool");
diff mbox

Patch

diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h
index 61d0b31..4d85930 100644
--- a/include/odp/api/queue.h
+++ b/include/odp/api/queue.h
@@ -133,7 +133,7 @@  odp_queue_t odp_queue_lookup(const char *name);
  * @retval 0 on success
  * @retval <0 on failure
  */
-int odp_queue_set_context(odp_queue_t queue, void *context);
+int odp_queue_context_set(odp_queue_t queue, void *context);
 
 /**
  * Get queue context
@@ -143,7 +143,7 @@  int odp_queue_set_context(odp_queue_t queue, void *context);
  * @return pointer to the queue context
  * @retval NULL on failure
  */
-void *odp_queue_get_context(odp_queue_t queue);
+void *odp_queue_context(odp_queue_t queue);
 
 /**
  * Queue enqueue
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index aa8b99f..4a0df11 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -286,7 +286,7 @@  int odp_queue_destroy(odp_queue_t handle)
 	return 0;
 }
 
-int odp_queue_set_context(odp_queue_t handle, void *context)
+int odp_queue_context_set(odp_queue_t handle, void *context)
 {
 	queue_entry_t *queue;
 	queue = queue_to_qentry(handle);
@@ -296,7 +296,7 @@  int odp_queue_set_context(odp_queue_t handle, void *context)
 	return 0;
 }
 
-void *odp_queue_get_context(odp_queue_t handle)
+void *odp_queue_context(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 	queue = queue_to_qentry(handle);
diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c
index 253b4c6..a0cdf0f 100644
--- a/test/validation/queue/queue.c
+++ b/test/validation/queue/queue.c
@@ -73,9 +73,9 @@  static void queue_test_sunnydays(void)
 	CU_ASSERT_EQUAL(ODP_SCHED_PRIO_LOWEST, odp_queue_sched_prio(queue_id));
 	CU_ASSERT_EQUAL(ODP_SCHED_SYNC_NONE, odp_queue_sched_type(queue_id));
 
-	CU_ASSERT(0 == odp_queue_set_context(queue_id, &queue_contest));
+	CU_ASSERT(0 == odp_queue_context_set(queue_id, &queue_contest));
 
-	prtn = odp_queue_get_context(queue_id);
+	prtn = odp_queue_context(queue_id);
 	CU_ASSERT(&queue_contest == (int *)prtn);
 
 	msg_pool = odp_pool_lookup("msg_pool");