Skip to content

Commit 3bd1fae

Browse files
committed
---
yaml --- r: 6343 b: refs/heads/master c: 5559e14 h: refs/heads/master i: 6341: 6d2dc2c 6339: 5c6918b 6335: 091bb5e v: v3
1 parent 6d49183 commit 3bd1fae

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
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: 55f89dbed994fef53beeaec49b20d450ca9b72d4
2+
refs/heads/master: 5559e149e492efadd803eb65f34c259a90c595e7

trunk/mk/rt.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ RUNTIME_CS_$(1) := \
6767

6868
RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.S \
6969
rt/arch/$$(HOST_$(1))/ccall.S \
70-
rt/arch/$$(HOST_$(1))/morestack.S
70+
rt/arch/$$(HOST_$(1))/morestack.S \
71+
rt/arch/$$(HOST_$(1))/record_sp.S
7172

7273
RUNTIME_HDR_$(1) := rt/globals.h \
7374
rt/rust.h \

trunk/src/rt/arch/i386/morestack.S

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,13 @@ L$bail:
106106

107107
#ifdef __APPLE__
108108

109-
.section __IMPORT,__pointers,non_lazy_symbol_pointers
109+
.section __IMPORT,__pointers,non_lazy_symbol_pointers
110110
rust_new_stack_sym:
111111
.indirect_symbol RUST_NEW_STACK
112112
.long 0
113113
rust_del_stack_sym:
114114
.indirect_symbol RUST_DEL_STACK
115115
.long 0
116116

117-
#else
118-
119-
rust_new_stack_sym:
120-
rust_del_stack_sym:
121-
122117
#endif
123118

trunk/src/rt/rust_scheduler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ DWORD rust_scheduler::task_key;
1313

1414
bool rust_scheduler::tls_initialized = false;
1515

16+
// Defined in arch/*/record_sp.S.
17+
extern "C" void rust_record_sp(uintptr_t sp);
18+
1619
rust_scheduler::rust_scheduler(rust_kernel *kernel,
1720
rust_srv *srv,
1821
int id) :
@@ -286,6 +289,7 @@ rust_scheduler::start_main_loop() {
286289
scheduled_task->state->name);
287290

288291
place_task_in_tls(scheduled_task);
292+
rust_record_sp(scheduled_task->stk->limit);
289293
//pthread_setspecific(89, (void *)scheduled_task->stk->limit);
290294

291295
interrupt_flag = 0;

0 commit comments

Comments
 (0)