From patchwork Mon Feb 2 15:42:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44152 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 018982034D for ; Mon, 2 Feb 2015 15:43:11 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf19900817wiv.2 for ; Mon, 02 Feb 2015 07:43: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=cfeSS/ik61HMs7PoEIhIeLfRQv3X9Btauw0kuOFFppdDmRyp8QXEyfqAHJ4AMn099P W1TfBXKEIMiHD80A2yKvUelsLg1Cis0R6VDkjq7+YbEflS8lAafQ4LwUK1FQP/lbUH+h qVIgbmCcKfffDL+ocMZomKmDFtnpwrZ3siY5/sLfrr9J8JLKz7zURGDXgx/IOUA7wZBx QGCZYDUTyzef/s2qbCxREzzvIbx94ezc3gsRTMWEIw8qZT1qjvWyAcuzI0zthFRheuI/ RBdmY8YiYDW4AN2ApnUjfti/EHMpkBjYyWxynSOVJqmuqy0fX0QCBk/FxkwuoxS82+Ik uTMg== X-Gm-Message-State: ALoCoQkDiXbspA0Wh9YRZFj7CtYcBRfWi3fe8dqUZ4BHltiILJk7h6nWIh0u5TXEg4Zz+Y1pmJc9 X-Received: by 10.194.204.201 with SMTP id la9mr2479800wjc.6.1422891788363; Mon, 02 Feb 2015 07:43:08 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.225 with SMTP id z1ls657925lad.109.gmail; Mon, 02 Feb 2015 07:43:08 -0800 (PST) X-Received: by 10.152.185.72 with SMTP id fa8mr19914815lac.73.1422891788134; Mon, 02 Feb 2015 07:43:08 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id yp4si17175542lbb.136.2015.02.02.07.43.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 07:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so42131439lab.12 for ; Mon, 02 Feb 2015 07:43:08 -0800 (PST) X-Received: by 10.152.203.230 with SMTP id kt6mr19598923lac.38.1422891788046; Mon, 02 Feb 2015 07:43: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 h5csp1371717lbj; Mon, 2 Feb 2015 07:43:07 -0800 (PST) X-Received: by 10.140.96.69 with SMTP id j63mr17276751qge.92.1422891783222; Mon, 02 Feb 2015 07:43:03 -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 4si25459269qgy.69.2015.02.02.07.43.01 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 07:43:03 -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 1YIJ9Q-0001mx-9B; Mon, 02 Feb 2015 15:43:00 +0000 Received: from mail-la0-f50.google.com ([209.85.215.50]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIJ92-0001ka-RM for lng-odp@lists.linaro.org; Mon, 02 Feb 2015 15:42:36 +0000 Received: by mail-la0-f50.google.com with SMTP id hs14so41997909lab.9 for ; Mon, 02 Feb 2015 07:42:31 -0800 (PST) X-Received: by 10.152.87.229 with SMTP id bb5mr20220592lab.92.1422891751320; Mon, 02 Feb 2015 07:42:31 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id w1sm4461682lal.49.2015.02.02.07.42.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Feb 2015 07:42:30 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Mon, 2 Feb 2015 16:42:16 +0100 Message-Id: <1422891740-5347-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422891740-5347-1-git-send-email-ola.liljedahl@linaro.org> References: <1422891740-5347-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 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.53 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.