about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 0947c44b2c9..a769051b7eb 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -557,86 +557,6 @@ upcall_start_task(rust_task *spawner,
 }
 
 /**
- * Called whenever a new domain is created.
- */
-extern "C" CDECL maybe_proxy<rust_task> *
-upcall_new_thread(rust_task *task, const char *name) {
-    I(task->dom, false);
-    LOG_UPCALL_ENTRY(task);
-    rust_dom *parent_dom = task->dom;
-    rust_kernel *kernel = parent_dom->kernel;
-    rust_handle<rust_dom> *child_dom_handle =
-        kernel->create_domain(name);
-    rust_handle<rust_task> *child_task_handle =
-        kernel->get_task_handle(child_dom_handle->referent()->root_task);
-    LOG(task, mem, "child name: %s, child_dom_handle: " PTR
-        ", child_task_handle: " PTR,
-        name, child_dom_handle, child_task_handle);
-    rust_proxy<rust_task> *child_task_proxy =
-        new rust_proxy<rust_task> (child_task_handle);
-    return child_task_proxy;
-}
-
-#if 0 /* FIXME: this code will be re-enabled once we have multithreading. */
-
-#if defined(__WIN32__)
-static DWORD WINAPI rust_thread_start(void *ptr)
-#elif defined(__GNUC__)
-static void *rust_thread_start(void *ptr)
-#else
-#error "Platform not supported"
-#endif
-{
-    // We were handed the domain we are supposed to run.
-    rust_dom *dom = (rust_dom *) ptr;
-
-    // Start a new rust main loop for this thread.
-    dom->start_main_loop();
-
-    // Destroy the domain.
-    dom->kernel->destroy_domain(dom);
-
-    return 0;
-}
-
-#endif
-
-/**
- * Called after a new domain is created. Here we create a new thread and
- * and start the domain main loop.
- */
-extern "C" CDECL maybe_proxy<rust_task> *
-upcall_start_thread(rust_task *task,
-                    rust_proxy<rust_task> *child_task_proxy,
-                    uintptr_t spawnee_fn,
-                    size_t callsz) {
-    I(task->dom, false);
-    LOG_UPCALL_ENTRY(task);
-#if 0
-    rust_dom *parenet_dom = task->dom;
-    rust_handle<rust_task> *child_task_handle = child_task_proxy->handle();
-    LOG(task, task,
-              "spawnee_fn " PTR
-              ", callsz %" PRIdPTR ")",
-              spawnee_fn, callsz);
-    rust_task *child_task = child_task_handle->referent();
-    child_task->start(spawnee_fn,
-                      task->rust_sp, callsz);
-#if defined(__WIN32__)
-    HANDLE thread;
-    thread = CreateThread(NULL, 0, rust_thread_start, child_task->dom, 0,
-                          NULL);
-    parenet_dom->win32_require("CreateThread", thread != NULL);
-#else
-    pthread_t thread;
-    pthread_create(&thread, &parenet_dom->attr, rust_thread_start,
-                   (void *) child_task->dom);
-#endif
-#endif // 0
-    return child_task_proxy;
-}
-
-/**
  * Resizes an interior vector that has been spilled to the heap.
  */
 extern "C" CDECL void