From patchwork Thu Oct 30 15:54:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 39843 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ADDDA202FE for ; Thu, 30 Oct 2014 15:55:15 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id b13sf2148451wgh.6 for ; Thu, 30 Oct 2014 08:55: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: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=yNU4aw8eR8tS5DvVSJmei7e7lGE9G/SHXP+ALysflvU=; b=ELLCzTH01oxkpV1jDcDL+lWS0rWPiaPjTkvkA2ghtmZgjp13kG+kXIBD4sKqGkHVFh lfmL98vqd5WrtvcRRPUp1mkqnG2WHQp9Pf/JBb77VHMDLQlpxael3mkNDfwKol3xSVbI muida8X3jIySrmju4OzFKtciYdHA86Bc3/UZLFMjEDP4gcx7khHslZP2FkKihjiDaO0S exxRxt23ReIDy+lFRzutWR22knKFLbuaTa9ri9cFEeUE9493entWg2gbOwyG3CX+F4I5 HPx4EbsiMfZ3VuiOndOlWsZiMul9lYiLOzxy3rjKP9hI/PXBiRIykDvzPPYBRyilpQ2o k+yQ== X-Gm-Message-State: ALoCoQkSJ6ijLMBkatXr6hvVoG0dBHuOC6yP7jblTifRmxNCtIZNaVbYmxn74PfIcGzhn7nBFdUK X-Received: by 10.112.137.202 with SMTP id qk10mr542638lbb.11.1414684514587; Thu, 30 Oct 2014 08:55:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.4 with SMTP id x4ls360800lag.42.gmail; Thu, 30 Oct 2014 08:55:14 -0700 (PDT) X-Received: by 10.112.180.198 with SMTP id dq6mr19608044lbc.56.1414684514381; Thu, 30 Oct 2014 08:55:14 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id mj1si12696738lbc.40.2014.10.30.08.55.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Oct 2014 08:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id z11so2551476lbi.5 for ; Thu, 30 Oct 2014 08:55:14 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr19728409lbc.23.1414684514206; Thu, 30 Oct 2014 08:55: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.84.229 with SMTP id c5csp68912lbz; Thu, 30 Oct 2014 08:55:12 -0700 (PDT) X-Received: by 10.140.84.106 with SMTP id k97mr6648613qgd.76.1414684512356; Thu, 30 Oct 2014 08:55:12 -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 q2si12820465qaq.121.2014.10.30.08.55.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 30 Oct 2014 08:55:11 -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 1Xjs45-0007pI-NM; Thu, 30 Oct 2014 15:55:09 +0000 Received: from mail-qa0-f50.google.com ([209.85.216.50]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xjs3y-0007oa-Rx for lng-odp@lists.linaro.org; Thu, 30 Oct 2014 15:55:02 +0000 Received: by mail-qa0-f50.google.com with SMTP id bm13so2222993qab.9 for ; Thu, 30 Oct 2014 08:54:55 -0700 (PDT) X-Received: by 10.224.171.194 with SMTP id i2mr27663842qaz.59.1414684491472; Thu, 30 Oct 2014 08:54:51 -0700 (PDT) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id s10sm7049350qac.14.2014.10.30.08.54.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Oct 2014 08:54:51 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 30 Oct 2014 11:54:44 -0400 Message-Id: <1414684484-57167-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] 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.174 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 Adding the compliment to odp_buffer_pool_create allows an implementation to release resources Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_buffer_pool.h | 11 +++++++++++ platform/linux-generic/odp_buffer_pool.c | 7 +++++++ 2 files changed, 18 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..160eb90 100644 --- a/platform/linux-generic/include/api/odp_buffer_pool.h +++ b/platform/linux-generic/include/api/odp_buffer_pool.h @@ -55,6 +55,17 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, size_t buf_size, size_t buf_align, int buf_type); +/** + * Delete a buffer pool + * + * @param pool 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) {