Add sched_threads rt function to get the number of scheduler threads
This commit is contained in:
parent
b8c209cba1
commit
9dbe6941c4
@ -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++
|
||||
|
@ -16,8 +16,6 @@ public:
|
||||
private:
|
||||
lock_and_signal _kernel_lock;
|
||||
|
||||
const size_t num_threads;
|
||||
|
||||
array_list<rust_scheduler *> threads;
|
||||
|
||||
randctx rctx;
|
||||
@ -30,10 +28,10 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
const size_t num_threads;
|
||||
int rval;
|
||||
|
||||
volatile int live_tasks;
|
||||
|
||||
struct rust_env *env;
|
||||
|
||||
rust_kernel(rust_srv *srv, size_t num_threads);
|
||||
|
@ -38,6 +38,7 @@ rust_run_program
|
||||
rust_start
|
||||
rust_getcwd
|
||||
set_min_stack
|
||||
sched_threads
|
||||
size_of
|
||||
squareroot
|
||||
str_alloc
|
||||
|
Loading…
Reference in New Issue
Block a user