diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-05-31 17:44:54 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-06-13 18:14:13 -0700 |
| commit | d1857d30fc05f29fb82231336b229e50948a8336 (patch) | |
| tree | 8a1ad8ad6dcda631e4858902008e3d7b8227b271 /src/rt/rust.cpp | |
| parent | 1595c9d767de72340358028e87d3eb386af0adfe (diff) | |
| download | rust-d1857d30fc05f29fb82231336b229e50948a8336.tar.gz rust-d1857d30fc05f29fb82231336b229e50948a8336.zip | |
This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
Diffstat (limited to 'src/rt/rust.cpp')
| -rw-r--r-- | src/rt/rust.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 6d092eea618..ae150acab17 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -93,9 +93,13 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) { DLOG(dom, dom, "startup: arg[%d] = '%s'", i, args->argv[i]); } + /* uintptr_t main_args[4] = {0, 0, 0, (uintptr_t)args->args}; dom->root_task->start(main_fn, (uintptr_t)&main_args, sizeof(main_args)); + */ + dom->root_task->start(main_fn, + (uintptr_t)args->args, sizeof(args->args)); int ret = dom->start_main_loop(); delete args; |
