diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-25 18:07:20 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-29 21:03:17 -0700 |
| commit | 9dbe6941c45571fb401719fa7b6a811a4ff0e80d (patch) | |
| tree | c74f1ab0712119357eb78e09fee23578236f7d30 /src/rt/rust_builtin.cpp | |
| parent | b8c209cba1038c64dea98d46b35b4bde30316dff (diff) | |
| download | rust-9dbe6941c45571fb401719fa7b6a811a4ff0e80d.tar.gz rust-9dbe6941c45571fb401719fa7b6a811a4ff0e80d.zip | |
Add sched_threads rt function to get the number of scheduler threads
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 6f45227bb8b..662ec3318d5 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -863,6 +863,11 @@ set_min_stack(rust_task *task, uintptr_t stack_size) { g_custom_min_stack_size = stack_size; } +extern "C" CDECL int +sched_threads(rust_task *task) { + return task->kernel->num_threads; +} + // // Local Variables: // mode: C++ |
