This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Go patch committed: New lock/note implementation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]