From patchwork Mon Feb 16 19:55:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44734 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C65E21544 for ; Mon, 16 Feb 2015 19:56:45 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id u56sf20754785wes.1 for ; Mon, 16 Feb 2015 11:56:44 -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=FOYN0WnvHI4mpKR5upqbTQJePvr0x1GpI75tbrOQWpU=; b=JKtaZ9mSh+W8blleZ2ch8xutjecB4tpQg0EuaUFNAnDf2mUuU6lzIaqmOOd/dKoAaF p+Q6x2ImlNjJF5U2R8ucND4uumxMIn9UPpZ1eSFm0e4oXjpgON50FEAYQWBUsgemWdbM ztEi5yB3BRJnwazs5QeKl8lt65xWUEwAsbyvD+5NR5T1CrFe5/2RebylVE6KJGIvp/nU L0hniu3Y23xocQhoDDW3EkIV8c5X9SUMQXld3l/S1ZVKbHWxzf/GklR0hMZu75yfJPbH A1KzVHEf1jJ25u1kXqKgvwu0M41HZO5RYcRIBpiscD7oeDRdHt/RrjiDuh07z/NTxxND H9Sg== X-Gm-Message-State: ALoCoQkWOl7Y9LC0POOA7g0+odfO5I+OtKYxyWY5EOZPNxSz8T/u9MJSbQK4PbU6kialC0WFU55N X-Received: by 10.194.11.70 with SMTP id o6mr3154302wjb.6.1424116604498; Mon, 16 Feb 2015 11:56:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.6 with SMTP id x6ls608536lag.70.gmail; Mon, 16 Feb 2015 11:56:44 -0800 (PST) X-Received: by 10.152.2.227 with SMTP id 3mr24576880lax.85.1424116604169; Mon, 16 Feb 2015 11:56:44 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ai4si9170190lbc.10.2015.02.16.11.56.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 11:56:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labms9 with SMTP id ms9so25875934lab.10 for ; Mon, 16 Feb 2015 11:56:44 -0800 (PST) X-Received: by 10.112.135.196 with SMTP id pu4mr24823668lbb.41.1424116604036; Mon, 16 Feb 2015 11:56:44 -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 h5csp1788087lbj; Mon, 16 Feb 2015 11:56:43 -0800 (PST) X-Received: by 10.140.236.84 with SMTP id h81mr1428224qhc.35.1424116602786; Mon, 16 Feb 2015 11:56:42 -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 i204si7028524qhc.53.2015.02.16.11.56.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Feb 2015 11:56:42 -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 1YNRmZ-0007eB-Em; Mon, 16 Feb 2015 19:56:39 +0000 Received: from mail-qc0-f170.google.com ([209.85.216.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNRlw-0007SM-Bl for lng-odp@lists.linaro.org; Mon, 16 Feb 2015 19:56:00 +0000 Received: by mail-qc0-f170.google.com with SMTP id c9so14052368qcz.1 for ; Mon, 16 Feb 2015 11:55:55 -0800 (PST) X-Received: by 10.229.131.138 with SMTP id x10mr193548qcs.25.1424116555250; Mon, 16 Feb 2015 11:55:55 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id o10sm4832854qag.9.2015.02.16.11.55.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Feb 2015 11:55:54 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 16 Feb 2015 14:55:19 -0500 Message-Id: <1424116520-20381-10-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424116520-20381-1-git-send-email-mike.holmes@linaro.org> References: <1424116520-20381-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 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.46 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 a7bb4a2..7f45a3e 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -59,6 +59,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 69569f1..732bd8f 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -146,5 +146,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 be5149b..33bd6e2 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) {