From 33a949eed6e6a5f2cba72663d92a0012e5439d80 Mon Sep 17 00:00:00 2001 From: Jon Morton Date: Mon, 2 Apr 2012 00:13:39 -0500 Subject: 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. --- src/rt/rust_shape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rt/rust_shape.cpp') 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 = -- cgit 1.4.1-3-g733a5