diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-02-09 22:15:15 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-09 22:15:15 -0800 |
| commit | d90a9d3da0f8c77d98bd38148d78db95f7f8fc5a (patch) | |
| tree | cedc6690bfd31bf7e97463f8c187e0d0a69fbfc0 /src/rt/rust_task_thread.cpp | |
| parent | dff256cd198b6575f5194abb059c1798b7198f6f (diff) | |
| download | rust-d90a9d3da0f8c77d98bd38148d78db95f7f8fc5a.tar.gz rust-d90a9d3da0f8c77d98bd38148d78db95f7f8fc5a.zip | |
rt: Inline everything on the C-stack-switching path
Diffstat (limited to 'src/rt/rust_task_thread.cpp')
| -rw-r--r-- | src/rt/rust_task_thread.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/rt/rust_task_thread.cpp b/src/rt/rust_task_thread.cpp index b42f1519933..e217c2e610e 100644 --- a/src/rt/rust_task_thread.cpp +++ b/src/rt/rust_task_thread.cpp @@ -337,16 +337,6 @@ rust_task_thread::place_task_in_tls(rust_task *task) { assert(!result && "Couldn't place the task in TLS!"); task->record_stack_limit(); } - -rust_task * -rust_task_thread::get_task() { - if (!tls_initialized) - return NULL; - rust_task *task = reinterpret_cast<rust_task *> - (pthread_getspecific(task_key)); - assert(task && "Couldn't get the task from TLS!"); - return task; -} #else void rust_task_thread::init_tls() { @@ -361,15 +351,6 @@ rust_task_thread::place_task_in_tls(rust_task *task) { assert(result && "Couldn't place the task in TLS!"); task->record_stack_limit(); } - -rust_task * -rust_task_thread::get_task() { - if (!tls_initialized) - return NULL; - rust_task *task = reinterpret_cast<rust_task *>(TlsGetValue(task_key)); - assert(task && "Couldn't get the task from TLS!"); - return task; -} #endif void @@ -402,32 +383,6 @@ rust_task_thread::unprepare_c_stack() { } } -// NB: Runs on the Rust stack -stk_seg * -rust_task_thread::borrow_c_stack() { - I(this, cached_c_stack); - stk_seg *your_stack; - if (extra_c_stack) { - your_stack = extra_c_stack; - extra_c_stack = NULL; - } else { - your_stack = cached_c_stack; - cached_c_stack = NULL; - } - return your_stack; -} - -// NB: Runs on the Rust stack -void -rust_task_thread::return_c_stack(stk_seg *stack) { - I(this, !extra_c_stack); - if (!cached_c_stack) { - cached_c_stack = stack; - } else { - extra_c_stack = stack; - } -} - // // Local Variables: // mode: C++ |
