rt: Make stack growth code build on Linux
This commit is contained in:
parent
e6c3c4e48c
commit
d624e523c9
3 changed files with 7 additions and 7 deletions
3
mk/rt.mk
3
mk/rt.mk
|
@ -67,8 +67,7 @@ RUNTIME_CS_$(1) := \
|
||||||
|
|
||||||
RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.S \
|
RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.S \
|
||||||
rt/arch/$$(HOST_$(1))/ccall.S \
|
rt/arch/$$(HOST_$(1))/ccall.S \
|
||||||
rt/arch/$$(HOST_$(1))/morestack.S \
|
rt/arch/$$(HOST_$(1))/morestack.S
|
||||||
rt/arch/$$(HOST_$(1))/record_sp.S
|
|
||||||
|
|
||||||
RUNTIME_HDR_$(1) := rt/globals.h \
|
RUNTIME_HDR_$(1) := rt/globals.h \
|
||||||
rt/rust.h \
|
rt/rust.h \
|
||||||
|
|
|
@ -106,7 +106,7 @@ L$bail:
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
.section __IMPORT,__pointers,non_lazy_symbol_pointers
|
.section __IMPORT,__pointers,non_lazy_symbol_pointers
|
||||||
rust_new_stack_sym:
|
rust_new_stack_sym:
|
||||||
.indirect_symbol RUST_NEW_STACK
|
.indirect_symbol RUST_NEW_STACK
|
||||||
.long 0
|
.long 0
|
||||||
|
@ -114,5 +114,10 @@ rust_del_stack_sym:
|
||||||
.indirect_symbol RUST_DEL_STACK
|
.indirect_symbol RUST_DEL_STACK
|
||||||
.long 0
|
.long 0
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
rust_new_stack_sym:
|
||||||
|
rust_del_stack_sym:
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,6 @@ DWORD rust_scheduler::task_key;
|
||||||
|
|
||||||
bool rust_scheduler::tls_initialized = false;
|
bool rust_scheduler::tls_initialized = false;
|
||||||
|
|
||||||
// Defined in arch/*/record_sp.S.
|
|
||||||
extern "C" void rust_record_sp(uintptr_t sp);
|
|
||||||
|
|
||||||
rust_scheduler::rust_scheduler(rust_kernel *kernel,
|
rust_scheduler::rust_scheduler(rust_kernel *kernel,
|
||||||
rust_srv *srv,
|
rust_srv *srv,
|
||||||
int id) :
|
int id) :
|
||||||
|
@ -289,7 +286,6 @@ rust_scheduler::start_main_loop() {
|
||||||
scheduled_task->state->name);
|
scheduled_task->state->name);
|
||||||
|
|
||||||
place_task_in_tls(scheduled_task);
|
place_task_in_tls(scheduled_task);
|
||||||
rust_record_sp(scheduled_task->stk->limit);
|
|
||||||
//pthread_setspecific(89, (void *)scheduled_task->stk->limit);
|
//pthread_setspecific(89, (void *)scheduled_task->stk->limit);
|
||||||
|
|
||||||
interrupt_flag = 0;
|
interrupt_flag = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue