about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-22 15:40:36 -0700
committerbors <bors@rust-lang.org>2013-07-22 15:40:36 -0700
commit73921f91a326e51118077ff3fd5c5c6196ff7c3a (patch)
tree23b03c59e5ea158fc0db7095cf94393c0f4546a1 /src/rt/rust_builtin.cpp
parent9ed82fbb43804ebc7e06daca5812079630ec8952 (diff)
parent407bffb33e59db9c2ed0c0c5a6533f2ab88743e0 (diff)
downloadrust-73921f91a326e51118077ff3fd5c5c6196ff7c3a.tar.gz
rust-73921f91a326e51118077ff3fd5c5c6196ff7c3a.zip
auto merge of #7883 : brson/rust/rm-std-net, r=graydon
This removes all the code from libextra that depends on libuv. After that it removes three runtime features that existed to support the global uv loop: weak tasks, runtime-global variables, and at_exit handlers.

The networking code doesn't have many users besides servo, so shouldn't have much fallout. The timer code though is useful and will probably break out-of-tree code until the new scheduler lands, but I expect that to be soon.

It also incidentally moves `os::change_dir_locked` to `std::unstable`. This is a function used by test cases to avoid cwd races and in my opinion shouldn't be public (#7870).

Closes #7251 and #7870
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 7e69e2e4ccb..06b09bcedd2 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -757,30 +757,6 @@ rust_raw_thread_join_delete(raw_thread *thread) {
     delete thread;
 }
 
-extern "C" void
-rust_register_exit_function(spawn_fn runner, fn_env_pair *f) {
-    rust_task *task = rust_get_current_task();
-    task->kernel->register_exit_function(runner, f);
-}
-
-extern "C" intptr_t*
-rust_get_global_data_ptr() {
-    rust_task *task = rust_get_current_task();
-    return &task->kernel->global_data;
-}
-
-extern "C" void
-rust_inc_kernel_live_count() {
-    rust_task *task = rust_get_current_task();
-    task->kernel->inc_live_count();
-}
-
-extern "C" void
-rust_dec_kernel_live_count() {
-    rust_task *task = rust_get_current_task();
-    task->kernel->dec_live_count();
-}
-
 #ifndef _WIN32
 #include <sys/types.h>
 #include <dirent.h>
@@ -959,6 +935,18 @@ rust_get_exit_status_newrt() {
     return exit_status;
 }
 
+static lock_and_signal change_dir_lock;
+
+extern "C" CDECL void
+rust_take_change_dir_lock() {
+    global_args_lock.lock();
+}
+
+extern "C" CDECL void
+rust_drop_change_dir_lock() {
+    global_args_lock.unlock();
+}
+
 //
 // Local Variables:
 // mode: C++