From patchwork Wed Jul 23 15:55:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 34165 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5C0CC20672 for ; Wed, 23 Jul 2014 15:55:32 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 9sf3017628ykp.7 for ; Wed, 23 Jul 2014 08:55:32 -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=NFjusjkYSLdCsjiLEg+CEsEvQAH67IPYfKIcy/dl9j4=; b=YgtlsEy6MZ7c5N1piiN9PCLhYwjtNN22c6lglWpvezY1/dicCFb6eWwqyW4MHHg3Kb l/IEiyjV8CZ/GEVken0CUDZILYyOQErqK1uzk5I1vOYc5x3PsO/Yf/Qv6UMvjloVKPiy FKS7AdEsWoykFzG96qaGXtDXkhFbrSSi3l9qhMTI7P3NMIVQloVJ5v+jsfV1wI/J8x1m kEde4mN5cp058Xhyr71NYg6odYcW8HhHIYkt3XonFa9nWttQqsSLK7f8aUKP0+MojGAc mpjj29pdk+wDKjkH/29y8M5f+64QnM3WXaPasGsNlRKYlJcuFTUfqPHUXCkyd8MfBPLX pV9Q== X-Gm-Message-State: ALoCoQmzvYeGEvWiizIL9oRXpRupDL9QzyhmCrVGJUK+2IxCdiB+WOG9o2M/PhiwDvXedw/55QWp X-Received: by 10.52.114.42 with SMTP id jd10mr914404vdb.0.1406130932053; Wed, 23 Jul 2014 08:55:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.52 with SMTP id l49ls370240qge.69.gmail; Wed, 23 Jul 2014 08:55:31 -0700 (PDT) X-Received: by 10.220.174.137 with SMTP id t9mr3665157vcz.12.1406130931917; Wed, 23 Jul 2014 08:55:31 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ez10si2480559vdb.103.2014.07.23.08.55.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 08:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hu12so2563609vcb.28 for ; Wed, 23 Jul 2014 08:55:29 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr2690683vdj.95.1406130929102; Wed, 23 Jul 2014 08:55:29 -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.221.37.5 with SMTP id tc5csp291463vcb; Wed, 23 Jul 2014 08:55:28 -0700 (PDT) X-Received: by 10.224.171.68 with SMTP id g4mr3502876qaz.104.1406130928635; Wed, 23 Jul 2014 08:55:28 -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 o39si5433063qga.10.2014.07.23.08.55.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Jul 2014 08:55:28 -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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X9yt3-0000UM-DF; Wed, 23 Jul 2014 15:55:25 +0000 Received: from mail-la0-f50.google.com ([209.85.215.50]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X9ysx-0000UG-SC for lng-odp@lists.linaro.org; Wed, 23 Jul 2014 15:55:20 +0000 Received: by mail-la0-f50.google.com with SMTP id gf5so1102700lab.9 for ; Wed, 23 Jul 2014 08:55:13 -0700 (PDT) X-Received: by 10.152.10.169 with SMTP id j9mr2457937lab.69.1406130913442; Wed, 23 Jul 2014 08:55:13 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id qa9sm5880302lbb.35.2014.07.23.08.55.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jul 2014 08:55:12 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Wed, 23 Jul 2014 18:55:03 +0300 Message-Id: <1406130904-13512-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: linux: Check if odp_init_local() succeeded 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: taras.kondratiuk@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.220.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 If odp_init_local() failed the thread should not run further. Signed-off-by: Taras Kondratiuk --- platform/linux-generic/odp_linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_linux.c b/platform/linux-generic/odp_linux.c index 10fdf44..6e2b448 100644 --- a/platform/linux-generic/odp_linux.c +++ b/platform/linux-generic/odp_linux.c @@ -19,6 +19,7 @@ #include #include #include +#include typedef struct { @@ -34,7 +35,11 @@ static void *odp_run_start_routine(void *arg) odp_start_args_t *start_args = arg; /* ODP thread local init */ - odp_init_local(start_args->thr_id); + if (odp_init_local(start_args->thr_id)) { + ODP_ERR("Local init failed for thread: %d\n", + start_args->thr_id); + return NULL; + } return start_args->start_routine(start_args->arg); }