From b3e5b5bd05fabf9b68ef350632254aa696d74b89 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Wed, 29 Jun 2011 18:56:34 -0700 Subject: Added inheritance for task pinning. Closes #598 for real. --- src/rt/rust_task.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 46c9aebe6cf..b2a60dc92bc 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -528,9 +528,15 @@ rust_task::free(void *mem, memory_region::memory_region_type type) { } void rust_task::pin() { + I(this->sched, running_on != -1); pinned_on = running_on; } +void rust_task::pin(int id) { + I(this->sched, running_on == -1); + pinned_on = id; +} + void rust_task::unpin() { pinned_on = -1; } -- cgit 1.4.1-3-g733a5