make boxes self-describing (fixes #1493)

This commit is contained in:
Niko Matsakis 2012-01-17 10:57:11 -08:00
parent 49cb3fc7df
commit c36207bfb8
26 changed files with 582 additions and 596 deletions

View file

@ -429,22 +429,6 @@ start_task(rust_task_id id, fn_env_pair *f) {
target->deref();
}
extern "C" CDECL void
migrate_alloc(void *alloc, rust_task_id tid) {
rust_task *task = rust_scheduler::get_task();
if(!alloc) return;
rust_task *target = task->kernel->get_task_by_id(tid);
if(target) {
const type_desc *tydesc = task->release_alloc(alloc);
target->claim_alloc(alloc, tydesc);
target->deref();
}
else {
// We couldn't find the target. Maybe we should just free?
task->fail();
}
}
extern "C" CDECL int
sched_threads() {
rust_task *task = rust_scheduler::get_task();