From patchwork Thu Jan 29 10:39:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 43906 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1128724119 for ; Thu, 29 Jan 2015 10:40:51 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id h11sf11394819wiw.1 for ; Thu, 29 Jan 2015 02:40:50 -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=binZHZ2yfJviuJ5r/agkOaW9CuDfPWS0Ae+zi2NWOBD7mhb+7C4xiXlQWCfaImw7hQ 1+eUQsV5xgDofHPZ8Rpu9yKFqd+Scd8v2Rl7soCBLd0M/PPP1iCWQQn3sZMFmkZn8TCB achS2WCiiAveZmyopqrB/cEyj/NY0NCAb5KRuU0VeKVV7ae1RdIbokvraYqUd+hSkzpk eC4sWaIRIrYXnCijQTQ0Pex8oLKjZ8AQVo8OZYdNYYMSsmjnv3fj5t7DXk9k4J1aHK6e pu8UjdUMsuJ4t8gAkU64TEMr2WUUl91kVttn/FPGlIxsciEGzlAEenX/D/Ao10/OvpgJ pqng== X-Gm-Message-State: ALoCoQnwQf5TpC0q3FN6oJ1yiwReM4hu3zETlP3oVYKUH9ZKuJHUCYHH8RlXs254FSIcfnQBOOvs X-Received: by 10.180.212.76 with SMTP id ni12mr310390wic.0.1422528050358; Thu, 29 Jan 2015 02:40:50 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.129 with SMTP id d1ls21844laf.18.gmail; Thu, 29 Jan 2015 02:40:50 -0800 (PST) X-Received: by 10.112.220.36 with SMTP id pt4mr13139891lbc.15.1422528050206; Thu, 29 Jan 2015 02:40:50 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id c7si863619lae.46.2015.01.29.02.40.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:40:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id f15so26589343lbj.0 for ; Thu, 29 Jan 2015 02:40:50 -0800 (PST) X-Received: by 10.152.23.195 with SMTP id o3mr28218laf.70.1422528050068; Thu, 29 Jan 2015 02:40:50 -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 h5csp1719454lbj; Thu, 29 Jan 2015 02:40:49 -0800 (PST) X-Received: by 10.224.126.201 with SMTP id d9mr5067qas.49.1422528048818; Thu, 29 Jan 2015 02:40:48 -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 91si9802065qgo.15.2015.01.29.02.40.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:40:48 -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 1YGmWj-0007LN-Qk; Thu, 29 Jan 2015 10:40:45 +0000 Received: from mail-lb0-f172.google.com ([209.85.217.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YGmWK-0007If-CX for lng-odp@lists.linaro.org; Thu, 29 Jan 2015 10:40:20 +0000 Received: by mail-lb0-f172.google.com with SMTP id l4so26613465lbv.3 for ; Thu, 29 Jan 2015 02:40:14 -0800 (PST) X-Received: by 10.152.10.238 with SMTP id l14mr122428lab.68.1422528014498; Thu, 29 Jan 2015 02:40:14 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id y11sm2037670lba.5.2015.01.29.02.40.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 02:40:13 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 11:39:56 +0100 Message-Id: <1422528008-29845-5-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422528008-29845-1-git-send-email-ola.liljedahl@linaro.org> References: <1422528008-29845-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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.217.169 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.