From patchwork Tue Feb 3 16:48:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44261 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 D75442034D for ; Tue, 3 Feb 2015 16:49:14 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf7330923lbj.0 for ; Tue, 03 Feb 2015 08:49:13 -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=T0zQzPeBOssZCb6N9Q83nKjPjgeY2nDuni/o26WgfPmiAyH1CEoXY1s9I4nwEV8Dcr rUQB/vd4qIi8VHNpXRg/hQwMvqF0U03dHLeHBLrwjyJm9pHKl+NBSumh0NySwLYLzc+D jNz1WFm2NRPuRfzKYP9Im+shmpDW7m8RpgNI6xt5Rb5zQItNX87hl/anI9X8etuWX/iR AFpHbB1vMs9OWTJkwFtNMT0rCGCm0DCY3P6mIJeK9HS57E1StqYpT1Ps7qVk05mrCAlA kjAstwxYsmF/9Qq5YhwqWb/C7U4q4hWczJxu63g8l9W0Hc7+4doqwz23UZxH7Ao6gT1F zh+Q== X-Gm-Message-State: ALoCoQk4RuSjx+lqH2HqHGz0ybvxB9rPg+5TiFz6c5J799zMLSNKiKqEtbRZNglOX5V4zlqHB9Zh X-Received: by 10.112.213.72 with SMTP id nq8mr3343558lbc.18.1422982153561; Tue, 03 Feb 2015 08:49:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.193 with SMTP id ao1ls838053lac.20.gmail; Tue, 03 Feb 2015 08:49:13 -0800 (PST) X-Received: by 10.112.126.98 with SMTP id mx2mr25995766lbb.84.1422982153416; Tue, 03 Feb 2015 08:49:13 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id k8si18301080lbs.115.2015.02.03.08.49.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 08:49:13 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id 10so39662058lbg.10 for ; Tue, 03 Feb 2015 08:49:13 -0800 (PST) X-Received: by 10.112.98.99 with SMTP id eh3mr25164370lbb.32.1422982153339; Tue, 03 Feb 2015 08:49:13 -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 h5csp2058373lbj; Tue, 3 Feb 2015 08:49:12 -0800 (PST) X-Received: by 10.140.18.178 with SMTP id 47mr51806294qgf.50.1422982151916; Tue, 03 Feb 2015 08:49:11 -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 z1si29409667qar.33.2015.02.03.08.49.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 08:49:11 -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 1YIgey-00089z-QJ; Tue, 03 Feb 2015 16:49:08 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIgea-00086f-NR for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 16:48:44 +0000 Received: by mail-la0-f52.google.com with SMTP id ge10so53412744lab.11 for ; Tue, 03 Feb 2015 08:48:38 -0800 (PST) X-Received: by 10.112.132.2 with SMTP id oq2mr25619907lbb.11.1422982118890; Tue, 03 Feb 2015 08:48:38 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id y2sm434179lay.23.2015.02.03.08.48.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Feb 2015 08:48:38 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 17:48:15 +0100 Message-Id: <1422982108-13813-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422982108-13813-1-git-send-email-ola.liljedahl@linaro.org> References: <1422982108-13813-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 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.217.179 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.