From patchwork Fri Oct 31 19:10:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 39970 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01FA22405B for ; Fri, 31 Oct 2014 19:10:41 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id h11sf992365wiw.7 for ; Fri, 31 Oct 2014 12:10:41 -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:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=ncHwG0y+TM1lHsmAcCREByJSer9fBLsIP5X5CMF3YGg=; b=KJDOcZ8HpybPDa7E55uLCcSRTo6mzrBDZVizZTawo6vLjj4vwQn3K+RjTw7ec3TTLL 2AOq8l3ZkaplztYbLlqWthNs2+K6UXktA1euXI/ACdZj/d4dKrYoj5Gqd4dKN7AbL9pf qT6lkQ/q+1D7sq2wS5KtxKz+PWziGGsQPXjyYvnEL95I44R7ro+ZhcI4ekF7hFYiv7J2 kPYAsA+8odBe8GIdyCOfT6iptlqk5zQvbip3LGKwbDzlzcJHz6uP/+wLHr0xIUce6bzN cKsiwsJReSDd48UyV1ZJ1JSSftE0tTVV35gBSfV86w9VzXnIpXTnclQooOCp00eT5j2p jFjQ== X-Gm-Message-State: ALoCoQk33s7knLDWDRZIUwKB8KDHcdkJZOshso+bVlCIEqkPDSzikkxCipz9O8IEUPR8fh5vpiKO X-Received: by 10.194.242.36 with SMTP id wn4mr756598wjc.4.1414782641213; Fri, 31 Oct 2014 12:10:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.13 with SMTP id bc13ls516493lab.21.gmail; Fri, 31 Oct 2014 12:10:40 -0700 (PDT) X-Received: by 10.152.87.18 with SMTP id t18mr24477165laz.0.1414782640934; Fri, 31 Oct 2014 12:10:40 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id n1si18355536lbc.10.2014.10.31.12.10.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 12:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id z11so4518146lbi.7 for ; Fri, 31 Oct 2014 12:10:40 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr28367104lbw.66.1414782640850; Fri, 31 Oct 2014 12:10:40 -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.84.229 with SMTP id c5csp248147lbz; Fri, 31 Oct 2014 12:10:40 -0700 (PDT) X-Received: by 10.224.128.201 with SMTP id l9mr41190279qas.1.1414782639309; Fri, 31 Oct 2014 12:10:39 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d10si18543044qar.59.2014.10.31.12.10.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 31 Oct 2014 12:10:39 -0700 (PDT) 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 1XkHam-0007rv-Qw; Fri, 31 Oct 2014 19:10:36 +0000 Received: from mail-qc0-f170.google.com ([209.85.216.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XkHaf-0007qJ-N2 for lng-odp@lists.linaro.org; Fri, 31 Oct 2014 19:10:29 +0000 Received: by mail-qc0-f170.google.com with SMTP id l6so6471865qcy.15 for ; Fri, 31 Oct 2014 12:10:24 -0700 (PDT) X-Received: by 10.224.41.142 with SMTP id o14mr40360382qae.100.1414782624418; Fri, 31 Oct 2014 12:10:24 -0700 (PDT) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id d2sm10119327qab.24.2014.10.31.12.10.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Oct 2014 12:10:23 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 31 Oct 2014 15:10:16 -0400 Message-Id: <1414782616-21821-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v2] add odp_buffer_pool_destroy 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: mike.holmes@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.176 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: Mike Holmes --- platform/linux-generic/include/api/odp_buffer_pool.h | 18 ++++++++++++++++++ platform/linux-generic/odp_buffer_pool.c | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h b/platform/linux-generic/include/api/odp_buffer_pool.h index d04abf0..7225fb7 100644 --- a/platform/linux-generic/include/api/odp_buffer_pool.h +++ b/platform/linux-generic/include/api/odp_buffer_pool.h @@ -55,6 +55,24 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, size_t buf_size, size_t buf_align, int buf_type); +/** + * Destroy a buffer pool + * + * This routine destroys a previously created buffer pool. + * @note Attempts to destroy a predefined buffer pool will be rejected. + * @warning The result is undefined if an attempt is made to destroy a buffer pool that + * contains allocated buffers. + * + * @sa odp_buffer_free + * + * @param pool[in] Buffer pool handle + * + * @retval 0 for success + * @retval 1 on failure + */ +int odp_buffer_pool_destroy(odp_buffer_pool_t pool); + + /** * Find a buffer pool by name diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index a48d7d6..d205f25 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -410,6 +411,12 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, return pool_hdl; } +/** @todo bug 619 */ +int odp_buffer_pool_destroy(odp_buffer_pool_t pool ODP_UNUSED) +{ + ODP_UNIMPLEMENTED(); + return 0; +} odp_buffer_pool_t odp_buffer_pool_lookup(const char *name) {