Skip to content

Commit 5559e14

Browse files
committed
Revert "rt: Make stack growth code build on Linux"
This reverts commit da4b7da.
1 parent 55f89db commit 5559e14

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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 \

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

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)