From patchwork Mon Sep 29 18:13:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 394537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7F65A1400B5 for ; Tue, 30 Sep 2014 04:13:45 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=m6hJEjL1MLD1JygT Wqnh4R9/9IG7n2a/9Ou/n23MWsrcfO/EvYuY4l3Ke1r+H4usQsSggFrc+yYUegVi corgEA8FnQWn3uDyebVeHOQ9TQlFSe5iDWufw1lkfswPSVFECviM3ZZiYK6mZ5hH 0YJsB2vAeW8HwyuHykqFD6fnPnM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=e6ARxqUcrJ3wl/K4djgjOa 6RTFg=; b=gC5tggZ+mIzXnzy/2IjZ+oDmfSEDlgeHZOEqRfoCx8/k0z+GOmnAgI o4s0cM7G9di1Z7im+qmTI2FuoyJO1UfwSAsvXDtsLp3clEN2RxdL1oM+o07yf9PI z2JLtB6astHiF8rFGupW8oGPHqm1V1IdGPsUYaVKud5Rt0CSk117k= Received: (qmail 6429 invoked by alias); 29 Sep 2014 18:13:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6417 invoked by uid 89); 29 Sep 2014 18:13:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Sep 2014 18:13:36 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-03.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XYfS0-0005Wv-Qn from Thomas_Schwinge@mentor.com ; Mon, 29 Sep 2014 11:13:33 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-03.mgc.mentorg.com (137.202.0.108) with Microsoft SMTP Server id 14.3.181.6; Mon, 29 Sep 2014 19:13:31 +0100 From: Thomas Schwinge To: "Iyer, Balaji V" , , CC: Subject: libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id (was: Cilk Library) In-Reply-To: References: <525460A9.2040409@redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (i486-pc-linux-gnu) Date: Mon, 29 Sep 2014 20:13:18 +0200 Message-ID: <8738bae1mp.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 9 Oct 2013 18:32:11 +0000, "Iyer, Balaji V" wrote: > [libcilkrts] I have found a function that is -- as far as I can tell -- unused, and I'm thus proposing to remove it. This increases portability, as this code has dependencies on the operating system. Tested on x86 GNU/Hurd, and x86_64 GNU/Linux is in progress. OK for trunk once testing completed? commit 4f32339be3c95330b7fcd3bc6bb520a7401aa510 Author: Thomas Schwinge Date: Sat Sep 20 19:53:56 2014 +0200 libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id. libcilkrts/ * runtime/sysdep-unix.c (__cilkrts_sysdep_is_worker_thread_id): Remove function. --- libcilkrts/runtime/sysdep-unix.c | 22 ---------------------- 1 file changed, 22 deletions(-) Grüße, Thomas diff --git libcilkrts/runtime/sysdep-unix.c libcilkrts/runtime/sysdep-unix.c index 1f82b62..b9f1ad0 100644 --- libcilkrts/runtime/sysdep-unix.c +++ libcilkrts/runtime/sysdep-unix.c @@ -571,28 +571,6 @@ void __cilkrts_make_unrunnable_sysdep(__cilkrts_worker *w, } } -/* - * __cilkrts_sysdep_is_worker_thread_id - * - * Returns true if the thread ID specified matches the thread ID we saved - * for a worker. - */ - -int __cilkrts_sysdep_is_worker_thread_id(global_state_t *g, - int i, - void *thread_id) -{ -#if defined( __linux__) || defined(__VXWORKS__) - pthread_t tid = *(pthread_t *)thread_id; - if (i < 0 || i > g->total_workers) - return 0; - return g->sysdep->threads[i] == tid; -#else - // Needs to be implemented - return 0; -#endif -} -