From patchwork Tue Apr 22 16:54:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 28826 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22597203C3 for ; Tue, 22 Apr 2014 16:54:50 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 200sf15638906ykr.10 for ; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=4fi9eE4beHnIq3Q6wk0r2ZFoCH9vu47mae/K+Nv8jhk=; b=U9YfQ1om9Sm80XFJyQaKdtGqxlkldw+SGIbmr1gajZZMKge3B/k0RKLKUyMgNFJmBj TEcn33X8clmrrSdj23ktO2RwxIC9RZ6cGaCrryc2RV6/Z1i5gv0mVgcDIm8uWgLIdiNP wrf4EVZrkglER1+VVBmzconcmlQe+zpJNo1wSlt1z3jWXNfmD+xVVXm8xsAgjQAag5ep KmKFpc9rNxF3MeWVfigDjhPwYvb0WNnUUMghh/plKplF7g4z/NFYAHnvyfAJNN+9z7Lm 07rdvLLPBLibAutr1R60RKT81nBnLCyWvVh2QqbixA3VavINASnXqWKREzQ9Jj6EqJ44 R1BA== X-Gm-Message-State: ALoCoQmQNSLzv3tndcvnqG4+fuHGzU3waiMmp+XkjDDPI8Ck58OcWfnx6t+ar44KtX09oWtWeoCs X-Received: by 10.52.165.179 with SMTP id yz19mr17872872vdb.1.1398185690590; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls206807qgd.91.gmail; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) X-Received: by 10.220.225.5 with SMTP id iq5mr399840vcb.42.1398185690472; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id vd8si6984479vdc.16.2014.04.22.09.54.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 09:54:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ib6so2997961vcb.27 for ; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) X-Received: by 10.220.162.6 with SMTP id t6mr38506699vcx.12.1398185690402; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) 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.220.221.72 with SMTP id ib8csp40028vcb; Tue, 22 Apr 2014 09:54:50 -0700 (PDT) X-Received: by 10.224.40.144 with SMTP id k16mr4573491qae.104.1398185689062; Tue, 22 Apr 2014 09:54:49 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id x5si3451947qcs.67.2014.04.22.09.54.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 22 Apr 2014 09:54:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wcdxk-0006Be-45; Tue, 22 Apr 2014 16:54:28 +0000 Received: from mail-qc0-f169.google.com ([209.85.216.169]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wcdxc-0006BZ-Ek for lng-odp@lists.linaro.org; Tue, 22 Apr 2014 16:54:20 +0000 Received: by mail-qc0-f169.google.com with SMTP id i17so5782247qcy.0 for ; Tue, 22 Apr 2014 09:54:34 -0700 (PDT) X-Received: by 10.224.30.131 with SMTP id u3mr50183010qac.50.1398185674446; Tue, 22 Apr 2014 09:54:34 -0700 (PDT) Received: from fedora1.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id j1sm74382574qan.32.2014.04.22.09.54.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Apr 2014 09:54:33 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 22 Apr 2014 12:54:20 -0400 Message-Id: <1398185660-25698-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [lng-odp] [PATCH] odp_debug.h: Add ODP_STATIC_ASSERT 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: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 Signed-off-by: Mike Holmes --- include/odp_debug.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/odp_debug.h b/include/odp_debug.h index 4d4f04e..e35c1ac 100644 --- a/include/odp_debug.h +++ b/include/odp_debug.h @@ -43,6 +43,12 @@ extern "C" { #define ODP_ASSERT(cond, msg) typedef char msg[(cond) ? 1 : -1] /** + * Compile time assertion-macro - fail compilation if cond is false. + * @note This macro has zero runtime overhead + */ +#define ODP_STATIC_ASSERT(cond, msg) _static_assert(cond, msg) + +/** * Debug printing macro, which prints output when DEBUG flag is set. */ #define ODP_DBG(fmt, ...) \