Skip to content

Commit d624e52

Browse files
committed
rt: Make stack growth code build on Linux
1 parent e6c3c4e commit d624e52

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mk/rt.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ 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 \
71-
rt/arch/$$(HOST_$(1))/record_sp.S
70+
rt/arch/$$(HOST_$(1))/morestack.S
7271

7372
RUNTIME_HDR_$(1) := rt/globals.h \
7473
rt/rust.h \

src/rt/arch/i386/morestack.S

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,18 @@ 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+
117122
#endif
118123

src/rt/rust_scheduler.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ 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-
1916
rust_scheduler::rust_scheduler(rust_kernel *kernel,
2017
rust_srv *srv,
2118
int id) :
@@ -289,7 +286,6 @@ rust_scheduler::start_main_loop() {
289286
scheduled_task->state->name);
290287

291288
place_task_in_tls(scheduled_task);
292-
rust_record_sp(scheduled_task->stk->limit);
293289
//pthread_setspecific(89, (void *)scheduled_task->stk->limit);
294290

295291
interrupt_flag = 0;

0 commit comments

Comments
 (0)