about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-06-05 22:34:35 -0700
committerBrian Anderson <banderson@mozilla.com>2013-06-06 17:53:13 -0700
commitf9a5005f52d528797d6b98a3bee73ab2d71b9aa3 (patch)
treeb68bb1dab39c064efdc3e275d03de3c8365c1613 /src/rt/rust_builtin.cpp
parent80849e78a847f7834f71b36a66251ba0ea37a982 (diff)
downloadrust-f9a5005f52d528797d6b98a3bee73ab2d71b9aa3.tar.gz
rust-f9a5005f52d528797d6b98a3bee73ab2d71b9aa3.zip
rt: Add rust_get_num_cpus
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 5e7357c9b7b..fe4e75fb8d2 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -930,6 +930,13 @@ rust_begin_unwind(uintptr_t token) {
 #endif
 }
 
+extern int get_num_cpus();
+
+extern "C" CDECL uintptr_t
+rust_get_num_cpus() {
+    return get_num_cpus();
+}
+
 //
 // Local Variables:
 // mode: C++