diff options
| author | Jon Morton <jonanin@gmail.com> | 2012-04-02 00:13:39 -0500 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-02 14:21:08 -0700 |
| commit | 33a949eed6e6a5f2cba72663d92a0012e5439d80 (patch) | |
| tree | 59f07f38799aa1cc90b6d9e76d402c8e1dc2f323 /src/rt/rust_uv.cpp | |
| parent | d0268cbe5f1347a1dc2a5762a981595687f161b6 (diff) | |
| download | rust-33a949eed6e6a5f2cba72663d92a0012e5439d80.tar.gz rust-33a949eed6e6a5f2cba72663d92a0012e5439d80.zip | |
Add global rust_get_current_task
Previously two methods existed: rust_sched_loop::get_task and rust_task::get_task_from_tcb. Merge both of them into one, trying the faster one (tcb) first, and if that fails, the slower one from the tls.
Diffstat (limited to 'src/rt/rust_uv.cpp')
| -rw-r--r-- | src/rt/rust_uv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp index d759ed84ef3..a926ed8b288 100644 --- a/src/rt/rust_uv.cpp +++ b/src/rt/rust_uv.cpp @@ -20,13 +20,13 @@ struct handle_data { // helpers static void* current_kernel_malloc(size_t size, const char* tag) { - void* ptr = rust_sched_loop::get_task()->kernel->malloc(size, tag); + void* ptr = rust_get_current_task()->kernel->malloc(size, tag); return ptr; } static void current_kernel_free(void* ptr) { - rust_sched_loop::get_task()->kernel->free(ptr); + rust_get_current_task()->kernel->free(ptr); } static handle_data* |
