diff options
| author | Jeff Olson <olson.jeffery@gmail.com> | 2012-04-11 22:14:16 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-20 15:23:21 -0700 |
| commit | c6667c06c34a25a8a21a1805b4f454f2d05d337c (patch) | |
| tree | e1b02f73b1c11f1ac5c4c39f769d793b32304107 /src/rt/rust_kernel.cpp | |
| parent | bf99a3aa932d32a1390ca58df403c68defc51a07 (diff) | |
| download | rust-c6667c06c34a25a8a21a1805b4f454f2d05d337c.tar.gz rust-c6667c06c34a25a8a21a1805b4f454f2d05d337c.zip | |
add needed fields for global libuv loop + bindings to manage from rust
adding two pointers fields to rust_kernel :( .. have to do manual malloc/free for one of the fields, which feels wrong
Diffstat (limited to 'src/rt/rust_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index a629f2ff4af..2a4315bd842 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -24,6 +24,13 @@ rust_kernel::rust_kernel(rust_env *env) : non_weak_tasks(0), env(env) { + // set up storage of pointers needed to + // access the global loop. + global_loop_chan = 0; + global_async_handle = (void**)::malloc( // FIXME -- can use this->malloc() + sizeof(void*)); // .. what do? + *global_async_handle = (void*)0; + // Create the single threaded scheduler that will run on the platform's // main thread rust_manual_sched_launcher_factory launchfac; |
