about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-07-09 01:02:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-07-09 17:31:01 -0700
commita89af1fa4cc8548a1c5e0a655a196d94b047ccd7 (patch)
tree7e118f4fc4e420bc6c8100d81d417e64c58328ed /src/rt
parente388a80c234d628c4d1fab77dc3e3f2c04cbefc5 (diff)
downloadrust-a89af1fa4cc8548a1c5e0a655a196d94b047ccd7.tar.gz
rust-a89af1fa4cc8548a1c5e0a655a196d94b047ccd7.zip
Use purely an owned vector for storing TLS data
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.cpp10
-rw-r--r--src/rt/rustrt.def.in1
2 files changed, 3 insertions, 8 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)) {
diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in
index 0da04e34f49..55caf038227 100644
--- a/src/rt/rustrt.def.in
+++ b/src/rt/rustrt.def.in
@@ -171,7 +171,6 @@ rust_destroy_little_lock
 rust_lock_little_lock
 rust_unlock_little_lock
 rust_get_task_local_data
-rust_set_task_local_data
 rust_task_local_data_atexit
 rust_task_ref
 rust_task_deref