diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-05-26 18:00:33 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-05-27 15:20:58 -0700 |
| commit | d49998f0ed9b0a239b40d30ccfde750f8439cac4 (patch) | |
| tree | 0d4de1a48c57f336578fc2fda528bbd9a16abb16 /src/rt/rust_upcall.cpp | |
| parent | 842bf7cad12dedbbd16e0838f4dd616acc765421 (diff) | |
| download | rust-d49998f0ed9b0a239b40d30ccfde750f8439cac4.tar.gz rust-d49998f0ed9b0a239b40d30ccfde750f8439cac4.zip | |
Switching over to wrappers for spawning functions of multiple arguments. Doesn't quite work yet.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index b0c362ecc7a..966ddb15eee 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -466,17 +466,21 @@ extern "C" CDECL rust_task * upcall_start_task(rust_task *spawner, rust_task *task, uintptr_t spawnee_fn, - uintptr_t args, - size_t callsz) { + uintptr_t args) { LOG_UPCALL_ENTRY(spawner); rust_dom *dom = spawner->dom; DLOG(dom, task, - "upcall start_task(task %s @0x%" PRIxPTR - ", spawnee 0x%" PRIxPTR - ", callsz %" PRIdPTR ")", task->name, task, - spawnee_fn, callsz); - task->start(spawnee_fn, args, callsz); + "upcall start_task(task %s @0x%" PRIxPTR + ", spawnee 0x%" PRIxPTR ")", + task->name, task, + spawnee_fn); + + // we used to be generating this tuple in rustc, but it's easier to do it + // here. + uintptr_t start_args[] = {0, 0, 0, args}; + + task->start(spawnee_fn, (uintptr_t)&start_args, sizeof(start_args)); return task; } |
