Skip to content

Commit 01b7fb7

Browse files
committed
---
yaml --- r: 4289 b: refs/heads/master c: 9dbe694 h: refs/heads/master i: 4287: ba9c0da v: v3
1 parent 170c415 commit 01b7fb7

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: b8c209cba1038c64dea98d46b35b4bde30316dff
2+
refs/heads/master: 9dbe6941c45571fb401719fa7b6a811a4ff0e80d

trunk/src/rt/rust_builtin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,11 @@ set_min_stack(rust_task *task, uintptr_t stack_size) {
863863
g_custom_min_stack_size = stack_size;
864864
}
865865

866+
extern "C" CDECL int
867+
sched_threads(rust_task *task) {
868+
return task->kernel->num_threads;
869+
}
870+
866871
//
867872
// Local Variables:
868873
// mode: C++

trunk/src/rt/rust_kernel.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ class rust_kernel {
1616
private:
1717
lock_and_signal _kernel_lock;
1818

19-
const size_t num_threads;
20-
2119
array_list<rust_scheduler *> threads;
2220

2321
randctx rctx;
@@ -30,10 +28,10 @@ class rust_kernel {
3028

3129
public:
3230

31+
const size_t num_threads;
3332
int rval;
3433

3534
volatile int live_tasks;
36-
3735
struct rust_env *env;
3836

3937
rust_kernel(rust_srv *srv, size_t num_threads);

trunk/src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ rust_run_program
3838
rust_start
3939
rust_getcwd
4040
set_min_stack
41+
sched_threads
4142
size_of
4243
squareroot
4344
str_alloc

0 commit comments

Comments
 (0)