This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Go patch committed: New lock/note implementation
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Fri, 25 Nov 2011 18:10:04 +0100
- Subject: Re: Go patch committed: New lock/note implementation
- References: <mcr62ibdhwi.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
Ian Lance Taylor <iant@google.com> writes:
> This patch updates the implementations of locks and notes used in libgo
> to use the current version from the master Go library. This now uses
> futexes when running on GNU/Linux, while still using semaphores on other
> systems. This implementation should be faster, and does not require
> explicit initialization. Bootstrapped and ran Go testsuite on
> x86_64-unknown-linux-gnu. I tested both the futex and the semaphore
> versions. Committed to mainline.
> +static int32
> +getproccount(void)
> +{
> + int32 fd, rd, cnt, cpustrlen;
> + const byte *cpustr, *pos;
> + byte *bufpos;
> + byte buf[256];
> +
> + fd = open("/proc/stat", O_RDONLY|O_CLOEXEC, 0);
This broke bootstrap on Linux/x86_64 (CentOS 5.5), which lacks
O_CLOEXEC.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University