From patchwork Mon Jul 27 17:02:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 51545 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id F091622918 for ; Mon, 27 Jul 2015 17:03:15 +0000 (UTC) Received: by lbbvz8 with SMTP id vz8sf29740960lbb.2 for ; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=/+x5j7bV2W/mZf/gI2KQ+NIMVB72JGORUpuMBwooksM=; b=lnOad+beCYwtzkJBXFR0lvafsQ0u5M8MqvWaQe0B7AB60nzDSS0+w2Ogab4xHQ+yKl 7edqFekwp3MEN6LDSME+MLTXluvRmt/rpS7ZRYY37uAJICpF8mGuy9+ChXL0KGitwZlL s86wXR3a+jskiHvPJhtVbMtS+4sR8CW3zhyy9A9g9w7NChABagNxpSqeY6YrZSAdFZq0 +KPbOTJpC555wkmA5nJldXtqjehrQ2fXrf8+GvblIju3hLa2nk9c56+98XsKwpDpgrTL 8z3/kC5EUINsmdkw9n8mphAqmLeX1qOGairJ3LVUNjswFl9vnkOW1AGX0g7QQ9e9i+5C JQ9g== X-Gm-Message-State: ALoCoQk93qFhHU75qEq5SEWpC7w3JR1WcDPhajwuZVG+MNNqBWQIKaqHTglpGLsR35S3TZgufSk3 X-Received: by 10.152.182.226 with SMTP id eh2mr12417549lac.0.1438016594832; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls694699lah.33.gmail; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) X-Received: by 10.112.83.135 with SMTP id q7mr28212997lby.13.1438016594679; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id f9si15746040laa.60.2015.07.27.10.03.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 10:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lblf12 with SMTP id f12so57808948lbl.2 for ; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr27664647lbc.72.1438016594521; Mon, 27 Jul 2015 10:03:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1642001lba; Mon, 27 Jul 2015 10:03:13 -0700 (PDT) X-Received: by 10.55.40.65 with SMTP id o62mr40808442qkh.41.1438016593066; Mon, 27 Jul 2015 10:03:13 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 199si16818302qhq.14.2015.07.27.10.03.12; Mon, 27 Jul 2015 10:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id F0A2161DAB; Mon, 27 Jul 2015 17:03:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B6B1561D1F; Mon, 27 Jul 2015 17:03:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D8BAF61D89; Mon, 27 Jul 2015 17:03:04 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by lists.linaro.org (Postfix) with ESMTPS id EE7C061CBA for ; Mon, 27 Jul 2015 17:03:03 +0000 (UTC) Received: by wicmv11 with SMTP id mv11so147570242wic.0 for ; Mon, 27 Jul 2015 10:03:03 -0700 (PDT) X-Received: by 10.195.11.202 with SMTP id ek10mr58260050wjd.12.1438016583188; Mon, 27 Jul 2015 10:03:03 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id pn6sm28815265wjb.36.2015.07.27.10.03.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jul 2015 10:03:02 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Mon, 27 Jul 2015 18:02:45 +0100 Message-Id: <1438016566-13800-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 1/2] api: queue: rename queue context get/set for consistency X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stuart.haslam@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Rename queue context APIs to make them consistent with the naming of other getter and setter APIs. Signed-off-by: Stuart Haslam Reviewed-by: Bill Fischofer --- 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");