[PATCH] Adjust lazy macro definition
[official-gcc.git] / libgo / runtime / getncpu-solaris.c
blob5d5d7025dfe430fe987186fbcd4f0fd3f18f17ad
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 #include <unistd.h>
7 #include "runtime.h"
8 #include "defs.h"
10 int32
11 getproccount(void)
13 int32 n;
14 n = (int32)sysconf(_SC_NPROCESSORS_ONLN);
15 return n > 1 ? n : 1;