From patchwork Mon Sep 22 15:35:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 37684 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22B9A202A1 for ; Mon, 22 Sep 2014 15:35:47 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id ty20sf3479208lab.4 for ; Mon, 22 Sep 2014 08:35:45 -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=FOBM2kOVErlJJ7uqYrzVT5m6g1CO9sGu0bivzYFJrs0=; b=XNP1EOpsNJZv/xpiGhmS3NLy2GWh7lrZsLbqFlEGecl7bij61ZElvdYBaduQJ5OoK1 FYRRMvjeROC3rXN3lS4pJv90JS+AAUVwcXQhogSRTnhK+p9lwo9CazlwKKXwByzoWS8Q inoyogmJjDbuMSxcTZ/D1YvPGsFUZnm4uMIQHA6QU2EzpOLiS/WGkNi4oBo11O5yFvdo zbibwxAw6B4ehaCqIrWpvgcE5+P/zfB4Ic2OOltRvhsL02UfdROGfFDWTrnlXxH9LdJA lewpv7uL6JruU7rIumjIZfZztlUkuImh0REpXmT5zoGO0pe9B/QgxXkg22UyhR7YyCML 7uDw== X-Gm-Message-State: ALoCoQkiPfPMU22yt/s+n1lbK2iM9qLJr/TcNGaiIMNoEa7OAT4pd3VZpgGwXe7sinhStOOHFFPs X-Received: by 10.112.157.193 with SMTP id wo1mr497637lbb.19.1411400145924; Mon, 22 Sep 2014 08:35:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.129 with SMTP id o1ls521139lal.75.gmail; Mon, 22 Sep 2014 08:35:45 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr7385147lbc.14.1411400145705; Mon, 22 Sep 2014 08:35:45 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by mx.google.com with ESMTPS id ll10si14959731lac.40.2014.09.22.08.35.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Sep 2014 08:35:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id w7so1344129lbi.20 for ; Mon, 22 Sep 2014 08:35:45 -0700 (PDT) X-Received: by 10.152.22.137 with SMTP id d9mr26583956laf.29.1411400145249; Mon, 22 Sep 2014 08:35:45 -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.112.130.169 with SMTP id of9csp259280lbb; Mon, 22 Sep 2014 08:35:44 -0700 (PDT) X-Received: by 10.140.27.139 with SMTP id 11mr22138079qgx.59.1411400143928; Mon, 22 Sep 2014 08:35:43 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id r10si9460339qck.17.2014.09.22.08.35.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Sep 2014 08:35:43 -0700 (PDT) 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 1XW5eP-0000Qb-7f; Mon, 22 Sep 2014 15:35:41 +0000 Received: from mail-qa0-f43.google.com ([209.85.216.43]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XW5eI-0000QM-9f for lng-odp@lists.linaro.org; Mon, 22 Sep 2014 15:35:34 +0000 Received: by mail-qa0-f43.google.com with SMTP id i13so272564qae.2 for ; Mon, 22 Sep 2014 08:35:29 -0700 (PDT) X-Received: by 10.140.51.104 with SMTP id t95mr19964676qga.31.1411400129071; Mon, 22 Sep 2014 08:35:29 -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 4sm8005540qax.48.2014.09.22.08.35.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Sep 2014 08:35:28 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 22 Sep 2014 11:35:16 -0400 Message-Id: <1411400116-33778-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] Update ODP_ERR to call abort 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 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 Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_debug.h | 7 +++++-- platform/linux-generic/odp_buffer_pool.c | 5 ----- platform/linux-generic/odp_time.c | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/platform/linux-generic/include/api/odp_debug.h b/platform/linux-generic/include/api/odp_debug.h index e8f6003..692a6b2 100644 --- a/platform/linux-generic/include/api/odp_debug.h +++ b/platform/linux-generic/include/api/odp_debug.h @@ -13,6 +13,7 @@ #define ODP_DEBUG_H_ #include +#include #ifdef __cplusplus extern "C" { @@ -76,8 +77,10 @@ extern "C" { * Print output to stderr (file, line and function). */ #define ODP_ERR(fmt, ...) \ - fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \ - __LINE__, __func__, ##__VA_ARGS__) +do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \ + __LINE__, __func__, ##__VA_ARGS__); \ + abort(); \ +} while (0) #ifdef __cplusplus } diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index f54a0c4..b88cf88 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -100,7 +100,6 @@ static inline void set_handle(odp_buffer_hdr_t *hdr, if (pool_id >= ODP_CONFIG_BUFFER_POOLS) { ODP_ERR("set_handle: Bad pool handle %u\n", pool_hdl); - exit(0); } if (index > ODP_BUFFER_MAX_INDEX) @@ -220,13 +219,11 @@ static void check_align(pool_entry_t *pool, odp_buffer_hdr_t *hdr) if (!ODP_ALIGNED_CHECK_POWER_2(hdr->addr, pool->s.user_align)) { ODP_ERR("check_align: user data align error %p, align %zu\n", hdr->addr, pool->s.user_align); - exit(0); } if (!ODP_ALIGNED_CHECK_POWER_2(hdr, ODP_CACHE_LINE_SIZE)) { ODP_ERR("check_align: hdr align error %p, align %i\n", hdr, ODP_CACHE_LINE_SIZE); - exit(0); } } @@ -265,7 +262,6 @@ static void fill_hdr(void *ptr, pool_entry_t *pool, uint32_t index, break; default: ODP_ERR("Bad buffer type\n"); - exit(0); } memset(hdr, 0, size); @@ -313,7 +309,6 @@ static void link_bufs(pool_entry_t *pool) hdr_size = sizeof(odp_any_buffer_hdr_t); } else { ODP_ERR("odp_buffer_pool_create: Bad type %i\n", buf_type); - exit(0); } /* Chunk must fit into buffer data area.*/ diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 181294a..b4b8650 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -60,7 +60,6 @@ uint64_t odp_time_get_cycles(void) if (ret != 0) { ODP_ERR("clock_gettime failed\n"); - exit(EXIT_FAILURE); } hz = odp_sys_cpu_hz();