From patchwork Thu Dec 1 23:50:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 128780 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]) by ozlabs.org (Postfix) with SMTP id 2F8701008F0 for ; Fri, 2 Dec 2011 10:51:20 +1100 (EST) Received: (qmail 12787 invoked by alias); 1 Dec 2011 23:51:18 -0000 Received: (qmail 12779 invoked by uid 22791); 1 Dec 2011 23:51:17 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Dec 2011 23:50:54 +0000 Received: by yenr11 with SMTP id r11so2526895yen.20 for ; Thu, 01 Dec 2011 15:50:53 -0800 (PST) Received: by 10.50.207.38 with SMTP id lt6mr10994264igc.43.1322783453659; Thu, 01 Dec 2011 15:50:53 -0800 (PST) Received: by 10.50.207.38 with SMTP id lt6mr10994231igc.43.1322783453187; Thu, 01 Dec 2011 15:50:53 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id eb23sm27013991ibb.2.2011.12.01.15.50.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Dec 2011 15:50:52 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Remove temporary function Date: Thu, 01 Dec 2011 15:50:49 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes 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 I added the function runtime_cond_wait to libgo temporarily during the conversion to multiplexing goroutines. It is no longer needed and this patch removes it. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 2ce500c576dc libgo/runtime/runtime.h --- a/libgo/runtime/runtime.h Thu Dec 01 10:55:24 2011 -0800 +++ b/libgo/runtime/runtime.h Thu Dec 01 15:41:16 2011 -0800 @@ -337,6 +337,3 @@ #ifdef __rtems__ void __wrap_rtems_task_variable_add(void **); #endif - -/* Temporary. */ -void runtime_cond_wait(pthread_cond_t*, pthread_mutex_t*); diff -r 2ce500c576dc libgo/runtime/thread.c --- a/libgo/runtime/thread.c Thu Dec 01 10:55:24 2011 -0800 +++ b/libgo/runtime/thread.c Thu Dec 01 15:41:16 2011 -0800 @@ -90,27 +90,3 @@ if(sigaltstack(&ss, nil) < 0) *(int *)0xf1 = 0xf1; } - -// Temporary functions, which will be removed when we stop using -// condition variables. - -void -runtime_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex) -{ - int i; - - runtime_entersyscall(); - - i = pthread_cond_wait(cond, mutex); - if(i != 0) - runtime_throw("pthread_cond_wait"); - i = pthread_mutex_unlock(mutex); - if(i != 0) - runtime_throw("pthread_mutex_unlock"); - - runtime_exitsyscall(); - - i = pthread_mutex_lock(mutex); - if(i != 0) - runtime_throw("pthread_mutex_lock"); -}