diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-07-09 01:02:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-07-09 17:31:01 -0700 |
| commit | a89af1fa4cc8548a1c5e0a655a196d94b047ccd7 (patch) | |
| tree | 7e118f4fc4e420bc6c8100d81d417e64c58328ed /src/rt/rust_builtin.cpp | |
| parent | e388a80c234d628c4d1fab77dc3e3f2c04cbefc5 (diff) | |
| download | rust-a89af1fa4cc8548a1c5e0a655a196d94b047ccd7.tar.gz rust-a89af1fa4cc8548a1c5e0a655a196d94b047ccd7.zip | |
Use purely an owned vector for storing TLS data
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 17f36e810cd..f240c7fa28a 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -672,14 +672,10 @@ rust_unlock_little_lock(lock_and_signal *lock) { lock->unlock(); } -// set/get/atexit task_local_data can run on the rust stack for speed. -extern "C" void * +// get/atexit task_local_data can run on the rust stack for speed. +extern "C" void ** rust_get_task_local_data(rust_task *task) { - return task->task_local_data; -} -extern "C" void -rust_set_task_local_data(rust_task *task, void *data) { - task->task_local_data = data; + return &task->task_local_data; } extern "C" void rust_task_local_data_atexit(rust_task *task, void (*cleanup_fn)(void *data)) { |
