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_shape.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_shape.cpp')
| -rw-r--r-- | src/rt/rust_shape.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index acf44836f28..472a691a6fa 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -552,7 +552,7 @@ extern "C" void shape_cmp_type(int8_t *result, const type_desc *tydesc, const type_desc **subtydescs, uint8_t *data_0, uint8_t *data_1, uint8_t cmp_type) { - rust_task *task = rust_sched_loop::get_task(); + rust_task *task = rust_get_current_task(); shape::arena arena; // FIXME: This may well be broken when comparing two closures or objects @@ -573,7 +573,7 @@ shape_cmp_type(int8_t *result, const type_desc *tydesc, extern "C" rust_str * shape_log_str(const type_desc *tydesc, uint8_t *data) { - rust_task *task = rust_sched_loop::get_task(); + rust_task *task = rust_get_current_task(); shape::arena arena; shape::type_param *params = @@ -591,7 +591,7 @@ shape_log_str(const type_desc *tydesc, uint8_t *data) { extern "C" void shape_log_type(const type_desc *tydesc, uint8_t *data, uint32_t level) { - rust_task *task = rust_sched_loop::get_task(); + rust_task *task = rust_get_current_task(); shape::arena arena; shape::type_param *params = |
