From patchwork Fri Jan 30 02:46:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44007 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22B0224128 for ; Fri, 30 Jan 2015 02:48:10 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf25999635lbv.1 for ; Thu, 29 Jan 2015 18:48:09 -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=dHre4fej3xDoYUy6BkCBQH8BRoZhn5yoKng+wY00EGE=; b=Cx5pE/4CMc2MhGFgXwpdSJp9eFWUvknGF4TTDc13gnk86XLkqMemGfs0coS3SA082k tsliP0cSi1dNG+LSoGRD8T4eO5lbJVcY+B1QZOLpjTfnuhPSRVzZcp3Fg35Uca9VwOTo ncCfCwrbUVkJDroCf+BjzsbMYtW8zRAdUB/yvimJ4jrUpenPkCOHw0LBbxWcd3d4Gsma BSE6yMqbeEUx5d1CwS6nBLOqfSlmEYjYbYO3H7xmlNlN2IYiB+KGzjFidUCVp8Kuqw3x uJydXHx0i5esx6X43Yt/4kbPRd9JgLmAidjvRi3Dwdhrt3egkQq6Lp+bJnph9xQojA1H AJww== X-Gm-Message-State: ALoCoQmeyQeFBDA9dicWdHiI1y/nIMfrPnz+aV/No6dFmt3JknVcjbEfO40yMk8uCdDMvIuY/vVH X-Received: by 10.152.37.71 with SMTP id w7mr484838laj.5.1422586089086; Thu, 29 Jan 2015 18:48:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.11 with SMTP id lk11ls392285lac.8.gmail; Thu, 29 Jan 2015 18:48:08 -0800 (PST) X-Received: by 10.152.26.98 with SMTP id k2mr4289419lag.53.1422586088780; Thu, 29 Jan 2015 18:48:08 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id m1si9075460lae.105.2015.01.29.18.48.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 18:48:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id gf13so21356113lab.8 for ; Thu, 29 Jan 2015 18:48:08 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr4368660laa.80.1422586088654; Thu, 29 Jan 2015 18:48: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 h5csp140884lbj; Thu, 29 Jan 2015 18:48:08 -0800 (PST) X-Received: by 10.140.42.194 with SMTP id c60mr7549359qga.61.1422586087464; Thu, 29 Jan 2015 18:48:07 -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 5si11997817qcl.7.2015.01.29.18.48.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 18:48:07 -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 1YH1cq-0002n6-LU; Fri, 30 Jan 2015 02:48:04 +0000 Received: from mail-qc0-f181.google.com ([209.85.216.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH1c5-0002ha-5C for lng-odp@lists.linaro.org; Fri, 30 Jan 2015 02:47:17 +0000 Received: by mail-qc0-f181.google.com with SMTP id l6so18629203qcy.12 for ; Thu, 29 Jan 2015 18:47:12 -0800 (PST) X-Received: by 10.224.30.145 with SMTP id u17mr8169467qac.46.1422586031926; Thu, 29 Jan 2015 18:47:11 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id n4sm8829452qas.20.2015.01.29.18.47.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 18:47:11 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 21:46:55 -0500 Message-Id: <1422586015-29874-10-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422586015-29874-1-git-send-email-mike.holmes@linaro.org> References: <1422586015-29874-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 09/10] linux-generic: schedule: add term_local 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.215.49 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 From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 +++++ platform/linux-generic/odp_schedule.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 5b81570..8c6b0b0 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -54,6 +54,7 @@ int odp_crypto_term_global(void); int odp_schedule_init_global(void); int odp_schedule_term_global(void); int odp_schedule_init_local(void); +int odp_schedule_term_local(void); int odp_timer_init_global(void); int odp_timer_disarm_all(void); diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 8e61368..3724fac 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -142,5 +142,10 @@ int odp_init_local(void) int odp_term_local(void) { + if (odp_schedule_term_local()) { + ODP_ERR("ODP schedule local term failed.\n"); + return -1; + } + return (odp_thread_term_local() > 0) ? 1 : 0; } diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 32dcf50..c72b998 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include @@ -188,6 +189,11 @@ int odp_schedule_init_local(void) return 0; } +int odp_schedule_term_local(void) +{ + memset(&sched_local, 0, sizeof(sched_local_t)); + return 0; +} void odp_schedule_mask_set(odp_queue_t queue, int prio) {