From patchwork Thu Feb 5 17:36:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 44468 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC7E521521 for ; Thu, 5 Feb 2015 17:37:02 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id k14sf6612519wgh.3 for ; Thu, 05 Feb 2015 09:37:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc: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=4jXxGfUv7tUuHpvDjQRRfZPzTiRxf/v8Ux4yZUWXunA=; b=ihU0hy6uNW+YVgAswkNMaeaweUBQkE2g7RmJKIFkhtcFhFdu73iFsdVCmYeqSmDkFu jICN0XX2sZJLR+0HptEoMPqNsG+sIJ8EsaD9lVlIrmhQmpWYrHw6rYaPEK59hfebb050 2CVIjQQDCD9Ag1Y5kUdLMTy5CDAzEwMuha4klY99gIdttjCeFRjMypIIxQDQ9VJzMGyP U4VBSVvIQdCuaGOzzD4AtfUc8Dlh9G6E7moEs1fSroGxUXJo68eL4E4yPwvrmCFykugo NAegPeA9KvjZhrdpw5CQCATjTewNHak6cQEO/Wfp6ie0LUf2hVy1f/j2iULJPuHOxVB4 IERg== X-Gm-Message-State: ALoCoQn/FdHctf24+wVsYaX46c8oQ1HezZOWFuHVurBbSuzyD3pmQTpsNvQx1bS6hagENYtHMyx0 X-Received: by 10.180.12.146 with SMTP id y18mr1277890wib.6.1423157821948; Thu, 05 Feb 2015 09:37:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.10 with SMTP id ca10ls187078lad.33.gmail; Thu, 05 Feb 2015 09:37:01 -0800 (PST) X-Received: by 10.152.8.104 with SMTP id q8mr5124718laa.56.1423157821785; Thu, 05 Feb 2015 09:37:01 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id az11si1459864lab.114.2015.02.05.09.37.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 09:37:01 -0800 (PST) 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 mail-lb0-f182.google.com with SMTP id l4so9694380lbv.13 for ; Thu, 05 Feb 2015 09:37:01 -0800 (PST) X-Received: by 10.112.171.168 with SMTP id av8mr5089858lbc.88.1423157821662; Thu, 05 Feb 2015 09:37:01 -0800 (PST) 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.35.133 with SMTP id h5csp1289487lbj; Thu, 5 Feb 2015 09:37:00 -0800 (PST) X-Received: by 10.229.68.202 with SMTP id w10mr10613472qci.13.1423157819839; Thu, 05 Feb 2015 09:36:59 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id k17si6796157qgd.66.2015.02.05.09.36.57 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 09:36:59 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJQMI-00055r-JS; Thu, 05 Feb 2015 17:36:54 +0000 Received: from mail-lb0-f175.google.com ([209.85.217.175]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJQMC-00055h-SK for lng-odp@lists.linaro.org; Thu, 05 Feb 2015 17:36:49 +0000 Received: by mail-lb0-f175.google.com with SMTP id n10so5459076lbv.6 for ; Thu, 05 Feb 2015 09:36:42 -0800 (PST) X-Received: by 10.112.162.167 with SMTP id yb7mr5154222lbb.76.1423157802833; Thu, 05 Feb 2015 09:36:42 -0800 (PST) Received: from condor-x220.synapse.com ([80.77.38.170]) by mx.google.com with ESMTPSA id 5sm1082980lau.42.2015.02.05.09.36.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 09:36:42 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Thu, 5 Feb 2015 19:36:37 +0200 Message-Id: <1423157797-23369-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-Topics: patch Cc: petri.savolainen@nsn.com Subject: [lng-odp] [PATCHv2] api: pool: move buffer allocation to buffer.h X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@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 Signed-off-by: Taras Kondratiuk Reviewed-by: Bill Fischofer --- include/odp/api/buffer.h | 19 +++++++++++++++++++ include/odp/api/pool.h | 20 -------------------- platform/linux-generic/include/odp/pool.h | 1 + 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index 09bddf2..4bbac1e 100644 --- a/include/odp/api/buffer.h +++ b/include/odp/api/buffer.h @@ -105,6 +105,25 @@ int odp_buffer_is_valid(odp_buffer_t buf); odp_pool_t odp_buffer_pool(odp_buffer_t buf); /** + * Buffer alloc + * + * The validity of a buffer can be cheked at any time with odp_buffer_is_valid() + * @param pool Pool handle + * + * @return Handle of allocated buffer + * @retval ODP_BUFFER_INVALID Buffer could not be allocated + */ +odp_buffer_t odp_buffer_alloc(odp_pool_t pool); + +/** + * Buffer free + * + * @param buf Buffer handle + * + */ +void odp_buffer_free(odp_buffer_t buf); + +/** * Print buffer metadata to STDOUT * * @param buf Buffer handle diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index 14d18fb..f5dda10 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -22,7 +22,6 @@ extern "C" { #include #include -#include #include /** @addtogroup odp_buffer @@ -195,25 +194,6 @@ void odp_pool_print(odp_pool_t pool); uint64_t odp_pool_to_u64(odp_pool_t hdl); /** - * Buffer alloc - * - * The validity of a buffer can be cheked at any time with odp_buffer_is_valid() - * @param pool Pool handle - * - * @return Handle of allocated buffer - * @retval ODP_BUFFER_INVALID Buffer could not be allocated - */ -odp_buffer_t odp_buffer_alloc(odp_pool_t pool); - -/** - * Buffer free - * - * @param buf Buffer handle - * - */ -void odp_buffer_free(odp_buffer_t buf); - -/** * @} */ diff --git a/platform/linux-generic/include/odp/pool.h b/platform/linux-generic/include/odp/pool.h index 0591fcf..e68b11e 100644 --- a/platform/linux-generic/include/odp/pool.h +++ b/platform/linux-generic/include/odp/pool.h @@ -25,6 +25,7 @@ extern "C" { * @} */ +#include #include #ifdef __cplusplus