From patchwork Fri Jan 30 09:28:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44027 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 912B72410D for ; Fri, 30 Jan 2015 09:30:10 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf28846773lbj.0 for ; Fri, 30 Jan 2015 01:30:05 -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=5XJPUQRFifEeGQ2YFQkhFQMunKCbsPBkEy6/AGqRKjA=; b=JtWEW9jAwXF25g1Md4AmdSOw5Uz79X/5za/vzT3CeghQAxhd+61YkE5JvJ+73d6FZn CYr96UbwzJOIKbuhH/+a1lcv8ZB7mFK103HtL9pLqA8i32xC+w7sLCPVJKFvcomcOIS0 G2J2OWKokigqlvcmmznMTyaYtvhtat+Ue/2WMDb3jkHZImlYJ2UZ6Wyj2hgmBNOqUR4a k87dls2JHWHj2Zo0rjEbhizH1KDEmoRKrJ1JK1n+9aaia6lmgFmqXBgsL+CiqKLRDqNW uwUWcMdLyRW+lORBM+ZoW/zdHsWeDnFWe8xgS9t5Q5LdZ7LTtj+0h/r6aW4MYX6cveP0 sthw== X-Gm-Message-State: ALoCoQk8CTU4SVnUeZfnanBjZa9OMRuNsc66ZuqKQPeQ64maLCvJbSfq8lF9P6ipuHve9H1O4N7I X-Received: by 10.112.174.36 with SMTP id bp4mr658041lbc.15.1422610184557; Fri, 30 Jan 2015 01:29:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.66 with SMTP id u2ls443302lal.32.gmail; Fri, 30 Jan 2015 01:29:44 -0800 (PST) X-Received: by 10.112.252.42 with SMTP id zp10mr5400950lbc.51.1422610184349; Fri, 30 Jan 2015 01:29:44 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id wn3si9736272lbb.25.2015.01.30.01.29.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 01:29:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id pv20so22567106lab.7 for ; Fri, 30 Jan 2015 01:29:44 -0800 (PST) X-Received: by 10.152.20.169 with SMTP id o9mr5624154lae.50.1422610184272; Fri, 30 Jan 2015 01:29:44 -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 h5csp220649lbj; Fri, 30 Jan 2015 01:29:43 -0800 (PST) X-Received: by 10.221.44.65 with SMTP id uf1mr1405727vcb.46.1422610182889; Fri, 30 Jan 2015 01:29:42 -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 iw10si4466220vdb.1.2015.01.30.01.29.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 01:29:42 -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 1YH7tT-0004Fq-Op; Fri, 30 Jan 2015 09:29:39 +0000 Received: from mail-la0-f53.google.com ([209.85.215.53]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH7sx-0004AZ-8e for lng-odp@lists.linaro.org; Fri, 30 Jan 2015 09:29:07 +0000 Received: by mail-la0-f53.google.com with SMTP id gq15so22654646lab.12 for ; Fri, 30 Jan 2015 01:29:01 -0800 (PST) X-Received: by 10.152.28.37 with SMTP id y5mr5429016lag.55.1422610141045; Fri, 30 Jan 2015 01:29:01 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id p5sm2614383laj.0.2015.01.30.01.29.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jan 2015 01:29:00 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Fri, 30 Jan 2015 10:28:48 +0100 Message-Id: <1422610133-20756-5-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422610133-20756-1-git-send-email-ola.liljedahl@linaro.org> References: <1422610133-20756-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 04/16] 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.48 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) platform/linux-generic/include/api/odp_buffer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/api/odp_buffer.h b/platform/linux-generic/include/api/odp_buffer.h index 8e144b8..13b9ea0 100644 --- a/platform/linux-generic/include/api/odp_buffer.h +++ b/platform/linux-generic/include/api/odp_buffer.h @@ -72,7 +72,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.