summaryrefslogtreecommitdiff
path: root/libgo/runtime/getncpu-aix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/getncpu-aix.c')
-rw-r--r--libgo/runtime/getncpu-aix.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libgo/runtime/getncpu-aix.c b/libgo/runtime/getncpu-aix.c
new file mode 100644
index 00000000000..064eed8570c
--- /dev/null
+++ b/libgo/runtime/getncpu-aix.c
@@ -0,0 +1,15 @@
+// Copyright 2012 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.
+
+#include <sys/types.h>
+#include <sys/systemcfg.h>
+
+#include "runtime.h"
+#include "defs.h"
+
+int32_t
+getproccount(void)
+{
+ return _system_configuration.ncpus;
+}