From 5559e149e492efadd803eb65f34c259a90c595e7 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 16 Nov 2011 18:49:07 -0800 Subject: [PATCH] Revert "rt: Make stack growth code build on Linux" This reverts commit da4b7da4e142a4c2119312c0e24b7c20bbe74e60. --- mk/rt.mk | 3 ++- src/rt/arch/i386/morestack.S | 7 +------ src/rt/rust_scheduler.cpp | 4 ++++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mk/rt.mk b/mk/rt.mk index 0208fe7ab55..1d6634557d0 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -67,7 +67,8 @@ RUNTIME_CS_$(1) := \ RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.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 \ rt/rust.h \ diff --git a/src/rt/arch/i386/morestack.S b/src/rt/arch/i386/morestack.S index b8e14bdb579..ec356ea91c6 100644 --- a/src/rt/arch/i386/morestack.S +++ b/src/rt/arch/i386/morestack.S @@ -106,7 +106,7 @@ L$bail: #ifdef __APPLE__ - .section __IMPORT,__pointers,non_lazy_symbol_pointers + .section __IMPORT,__pointers,non_lazy_symbol_pointers rust_new_stack_sym: .indirect_symbol RUST_NEW_STACK .long 0 @@ -114,10 +114,5 @@ rust_del_stack_sym: .indirect_symbol RUST_DEL_STACK .long 0 -#else - -rust_new_stack_sym: -rust_del_stack_sym: - #endif diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp index cf6091818cc..b17565dda46 100644 --- a/src/rt/rust_scheduler.cpp +++ b/src/rt/rust_scheduler.cpp @@ -13,6 +13,9 @@ DWORD rust_scheduler::task_key; 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_srv *srv, int id) : @@ -286,6 +289,7 @@ rust_scheduler::start_main_loop() { scheduled_task->state->name); place_task_in_tls(scheduled_task); + rust_record_sp(scheduled_task->stk->limit); //pthread_setspecific(89, (void *)scheduled_task->stk->limit); interrupt_flag = 0;