diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-01-12 23:27:46 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-01-17 19:24:50 -0800 |
| commit | db1abbec4ca9f18a224441c483cf23bb4f8361fd (patch) | |
| tree | 2adeac14bbca31e2bf09708ea1f36b6a39e65953 /src/rt/rust_builtin.cpp | |
| parent | ac435af73a0009daf22164ee2f081a7c98ca844c (diff) | |
| download | rust-db1abbec4ca9f18a224441c483cf23bb4f8361fd.tar.gz rust-db1abbec4ca9f18a224441c483cf23bb4f8361fd.zip | |
core: Add private global data interface. #3915
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index a37aea13e40..221afb89b23 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -1032,6 +1032,12 @@ rust_register_exit_function(spawn_fn runner, fn_env_pair *f) { task->kernel->register_exit_function(runner, f); } +extern "C" void * +rust_get_global_data_ptr() { + rust_task *task = rust_get_current_task(); + return &task->kernel->global_data; +} + // // Local Variables: // mode: C++ |
