gcc/libgo/runtime/go-gomaxprocs.c
Ian Lance Taylor adb0401dac Update Go library to r60.
From-SVN: r178910
2011-09-16 15:47:21 +00:00

24 lines
528 B
C

/* go-gomaxprocs.c -- runtime.GOMAXPROCS.
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
/* This is the runtime.GOMAXPROCS function. This currently does
nothing, since each goroutine runs in a separate thread anyhow. */
extern int GOMAXPROCS (int) asm ("libgo_runtime.runtime.GOMAXPROCS");
static int set = 1;
int
GOMAXPROCS (int n)
{
int ret;
ret = set;
if (n > 0)
set = n;
return ret;
}