From patchwork Tue Feb 3 14:53:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44233 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 4B6C32034D for ; Tue, 3 Feb 2015 14:54:10 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id k14sf21076822wgh.3 for ; Tue, 03 Feb 2015 06:54:08 -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: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=gXbItJ+ndrGmt8Z0ugN+Lv+ZPcgZKd6wyvcaQfvujmM=; b=KmIRlWc47v54rJFp7U8GCwyzJRfiq3Zj7Mh2100nJOghm5+2Mgjqp4MFg8mVmdniHh WUhj9YjNWsHLHxUJXX9oqNJIypEpy6HhJb+s40f0pkXU0QXd9TcIthuPdEysmqjmn/wn PaD/ogbwe90ySAYNVSDzI7iC13GlM4/i0QYXi/EawRSXT9JeFp4dUw9SmQm7tYTSPnet YV7xik9+mNzw2IXXtsxFaMlXps6j09z76EZQE/VYfjxBhnntSG/wB4osZQS9+pmjx1+N i0D15ES6DKlSifq5sUZOdQbAlpQEhB/lI89vhuUAbNaGEE5Cxgigwd83ib8Hmdmy7ciG z2eg== X-Gm-Message-State: ALoCoQl9cwTuxPQ09Zp94ictu6q4npCNGDl1AwfX2joe6SR0C8kOM43/Ps0FhBFrvZy7reUX/Sj4 X-Received: by 10.113.5.167 with SMTP id cn7mr842788lbd.21.1422975248687; Tue, 03 Feb 2015 06:54:08 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.134 with SMTP id c6ls704142lag.103.gmail; Tue, 03 Feb 2015 06:54:08 -0800 (PST) X-Received: by 10.152.37.165 with SMTP id z5mr1572354laj.88.1422975248546; Tue, 03 Feb 2015 06:54:08 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ru3si19363417lbb.49.2015.02.03.06.54.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 06:54:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gm9so52591158lab.0 for ; Tue, 03 Feb 2015 06:54:08 -0800 (PST) X-Received: by 10.152.228.161 with SMTP id sj1mr4011936lac.74.1422975248424; Tue, 03 Feb 2015 06:54:08 -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 h5csp1987819lbj; Tue, 3 Feb 2015 06:54:07 -0800 (PST) X-Received: by 10.140.107.227 with SMTP id h90mr4758928qgf.71.1422975245546; Tue, 03 Feb 2015 06:54:05 -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 k9si20625854qch.49.2015.02.03.06.54.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 06:54:05 -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 1YIera-0001bQ-34; Tue, 03 Feb 2015 14:54:02 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIerC-0001Xq-0W for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 14:53:38 +0000 Received: by mail-la0-f46.google.com with SMTP id s18so52618339lam.5 for ; Tue, 03 Feb 2015 06:53:32 -0800 (PST) X-Received: by 10.152.206.2 with SMTP id lk2mr20484948lac.13.1422975212438; Tue, 03 Feb 2015 06:53:32 -0800 (PST) Received: from localhost.localdomain (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id jf3sm5082572lbc.44.2015.02.03.06.53.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Feb 2015 06:53:31 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 15:53:08 +0100 Message-Id: <1422975201-3364-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422975201-3364-1-git-send-email-ola.liljedahl@linaro.org> References: <1422975201-3364-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 05/18] api: odp_buffer.h: undefined behavior description 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: ola.liljedahl@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.215.41 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 Documented API calls which are guaranteed to handle invalid/stale handles. Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/buffer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/odp/api/buffer.h b/include/odp/api/buffer.h index 12b2f5a..1eb2e5a 100644 --- a/include/odp/api/buffer.h +++ b/include/odp/api/buffer.h @@ -88,7 +88,9 @@ uint32_t odp_buffer_size(odp_buffer_t buf); /** * Tests if buffer is valid * - * @param buf Buffer handle + * @param buf Buffer handle (possibly invalid) + * @note This is the only buffer API function which accepts invalid buffer + * handles (any bit value) without causing undefined behavior. * * @retval 1 Buffer handle represents a valid buffer. * @retval 0 Buffer handle does not represent a valid buffer.