From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30875 invoked by alias); 27 Oct 2011 13:24:14 -0000 Received: (qmail 30861 invoked by uid 22791); 27 Oct 2011 13:24:13 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 13:23:55 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id AA71D1B4E; Thu, 27 Oct 2011 15:23:53 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HFDQXCLVvmF0; Thu, 27 Oct 2011 15:23:43 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 3B5D917C3; Thu, 27 Oct 2011 14:54:17 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id p9RCsGm8009574; Thu, 27 Oct 2011 14:54:16 +0200 (MEST) From: Rainer Orth To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Re: Go patch committed: Update Go library References: Date: Thu, 27 Oct 2011 14:46:00 -0000 In-Reply-To: (Ian Lance Taylor's message of "Wed, 26 Oct 2011 17:00:05 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02470.txt.bz2 --=-=-= Content-length: 840 Ian, > This patch updates the Go library to the most recent weekly release. I > think the only potential portability issues here are the use of the > ipv6_mreq struct. I'm not entirely sure the new exp/terminal package is > portable, but it might be. the only issue I've found on Solaris is the use of pthread_yield, which doesn't exist even on Solaris 11. The following patch checks for this, and falls back to thr_yield if available. It allowed i386-pc-solaris2.1[01] bootstraps to complete without regressions. Rainer 2011-10-27 Rainer Orth * configure.ac: Check for . Check for pthread_yield, thr_yield. * configure: Regenerate. * config.h.in: Regenerate. * runtime/yield.c [HAVE_THREAD_H]: Include . (runtime_osyield): Call thr_yield or pthread_yield if available. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-libgo-pthread_yield.patch Content-length: 1510 diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -442,7 +442,7 @@ no) ;; esac -AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h) +AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h thread.h) AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [], [#ifdef HAVE_SYS_SOCKET_H @@ -452,7 +452,7 @@ AC_CHECK_HEADERS([linux/filter.h linux/n AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes) -AC_CHECK_FUNCS(srandom random strerror_r strsignal wait4 mincore setenv) +AC_CHECK_FUNCS(srandom random strerror_r strsignal wait4 mincore setenv pthread_yield thr_yield) AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes) AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes) diff --git a/libgo/runtime/yield.c b/libgo/runtime/yield.c --- a/libgo/runtime/yield.c +++ b/libgo/runtime/yield.c @@ -9,6 +9,9 @@ #include #include #include +#ifdef HAVE_THREAD_H +#include +#endif #include #include @@ -38,7 +41,11 @@ runtime_procyield (uint32 cnt) void runtime_osyield (void) { +#ifdef HAVE_THR_YIELD + thr_yield (); +#elif defined(HAVE_PTHREAD_YIELD) pthread_yield (); +#endif } /* Sleep for some number of microseconds. */ --=-=-= Content-length: 144 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--