Skip to content

Commit 9b8b888

Browse files
committed
---
yaml --- r: 142600 b: refs/heads/try2 c: f9a5005 h: refs/heads/master v: v3
1 parent 087a9dd commit 9b8b888

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 80849e78a847f7834f71b36a66251ba0ea37a982
8+
refs/heads/try2: f9a5005f52d528797d6b98a3bee73ab2d71b9aa3
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/rt/rust_builtin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,13 @@ rust_begin_unwind(uintptr_t token) {
930930
#endif
931931
}
932932

933+
extern int get_num_cpus();
934+
935+
extern "C" CDECL uintptr_t
936+
rust_get_num_cpus() {
937+
return get_num_cpus();
938+
}
939+
933940
//
934941
// Local Variables:
935942
// mode: C++

branches/try2/src/rt/rust_env.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ rust_drop_env_lock() {
4040
}
4141

4242
#if defined(__WIN32__)
43-
static int
43+
int
4444
get_num_cpus() {
4545
SYSTEM_INFO sysinfo;
4646
GetSystemInfo(&sysinfo);
4747

4848
return (int) sysinfo.dwNumberOfProcessors;
4949
}
5050
#elif defined(__BSD__)
51-
static int
51+
int
5252
get_num_cpus() {
5353
/* swiped from http://stackoverflow.com/questions/150355/
5454
programmatically-find-the-number-of-cores-on-a-machine */
@@ -75,7 +75,7 @@ get_num_cpus() {
7575
return numCPU;
7676
}
7777
#elif defined(__GNUC__)
78-
static int
78+
int
7979
get_num_cpus() {
8080
return sysconf(_SC_NPROCESSORS_ONLN);
8181
}

branches/try2/src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,4 @@ rust_valgrind_stack_deregister
239239
rust_take_env_lock
240240
rust_drop_env_lock
241241
rust_update_log_settings
242+
rust_get_num_cpus

0 commit comments

Comments
 (0)