Skip to content

Commit d2694ed

Browse files
committed
---
yaml --- r: 15275 b: refs/heads/try c: bcb9269 h: refs/heads/master i: 15273: 1a49a49 15271: c4fec66 v: v3
1 parent 2afffc7 commit d2694ed

File tree

7 files changed

+8
-12
lines changed

7 files changed

+8
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: bee45f0ef0e34a66a2fafeddb7915f305cec5081
5+
refs/heads/try: bcb9269d8438c5fe35ddaf87b22e77b2acb92bc8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
rust_kernel::rust_kernel(rust_env *env) :
1313
_region(env, true),
14-
_log(env, NULL),
14+
_log(NULL),
1515
max_task_id(0),
1616
max_port_id(0),
1717
rval(0),

branches/try/src/rt/rust_log.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ log_console_off(rust_env *env) {
4040
}
4141
}
4242

43-
rust_log::rust_log(rust_env *env, rust_sched_loop *sched_loop) :
44-
_env(env),
43+
rust_log::rust_log(rust_sched_loop *sched_loop) :
4544
_sched_loop(sched_loop) {
4645
}
4746

branches/try/src/rt/rust_log.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ struct rust_task;
4040
class rust_log {
4141

4242
public:
43-
rust_log(rust_env *env, rust_sched_loop *sched_loop);
43+
rust_log(rust_sched_loop *sched_loop);
4444
virtual ~rust_log();
4545

4646
void trace_ln(rust_task *task, uint32_t level, char *message);
4747
void trace_ln(char *prefix, char *message);
4848
bool is_tracing(uint32_t type_bits);
4949

5050
private:
51-
rust_env *_env;
5251
rust_sched_loop *_sched_loop;
5352
bool _use_labels;
5453
void trace_ln(rust_task *task, char *message);

branches/try/src/rt/rust_sched_loop.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const size_t C_STACK_SIZE = 1024*1024;
1818
bool rust_sched_loop::tls_initialized = false;
1919

2020
rust_sched_loop::rust_sched_loop(rust_scheduler *sched,int id) :
21-
_log(env, this),
21+
_log(this),
2222
id(id),
2323
should_exit(false),
2424
cached_c_stack(NULL),
@@ -28,8 +28,7 @@ rust_sched_loop::rust_sched_loop(rust_scheduler *sched,int id) :
2828
sched(sched),
2929
log_lvl(log_debug),
3030
min_stack_size(kernel->env->min_stack_size),
31-
env(kernel->env),
32-
local_region(env, false),
31+
local_region(kernel->env, false),
3332
// TODO: calculate a per scheduler name.
3433
name("main")
3534
{
@@ -277,7 +276,7 @@ rust_sched_loop::create_task(rust_task *spawner, const char *name) {
277276
rust_task *task =
278277
new (this->kernel, "rust_task")
279278
rust_task (this, task_state_newborn,
280-
spawner, name, env->min_stack_size);
279+
spawner, name, kernel->env->min_stack_size);
281280
DLOG(this, task, "created task: " PTR ", spawner: %s, name: %s",
282281
task, spawner ? spawner->name : "null", name);
283282

branches/try/src/rt/rust_sched_loop.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ struct rust_sched_loop
7979
uint32_t log_lvl;
8080

8181
size_t min_stack_size;
82-
rust_env *env;
8382
memory_region local_region;
8483

8584
randctx rctx;

branches/try/src/rt/rust_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ rust_task::new_stack(size_t requested_sz) {
513513
size_t rust_stk_sz = get_next_stack_size(min_sz,
514514
current_sz, requested_sz);
515515

516-
if (total_stack_sz + rust_stk_sz > sched_loop->env->max_stack_size) {
516+
if (total_stack_sz + rust_stk_sz > kernel->env->max_stack_size) {
517517
LOG_ERR(this, task, "task %" PRIxPTR " ran out of stack", this);
518518
fail();
519519
}

0 commit comments

Comments
 (0)