diff options
| author | bors <bors@rust-lang.org> | 2013-07-31 02:10:24 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-31 02:10:24 -0700 |
| commit | 8b7e241e02bb9f82d7b931033afde477d03ff4f2 (patch) | |
| tree | 84f3b2d5a4f8f81f86b7a04ab937d4a0d18a8366 /src/rt/rust_builtin.cpp | |
| parent | 8a737b502067b1896686bd1f9df7a1446296d80b (diff) | |
| parent | 33df9fc1d04c224a0c7ecb8d91b75feed75b412c (diff) | |
| download | rust-8b7e241e02bb9f82d7b931033afde477d03ff4f2.tar.gz rust-8b7e241e02bb9f82d7b931033afde477d03ff4f2.zip | |
auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwalton
This removes a bunch of options from the task builder interface that are irrelevant to the new scheduler and were generally unused anyway. It also bumps the stack size of new scheduler tasks so that there's enough room to run rustc and changes the interface to `Thread` to not implicitly join threads on destruction, but instead require an explicit, and mandatory, call to `join`.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 06b09bcedd2..3c9bff000ea 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -549,18 +549,6 @@ start_task(rust_task *target, fn_env_pair *f) { target->start(f->f, f->env, NULL); } -extern "C" CDECL size_t -rust_sched_current_nonlazy_threads() { - rust_task *task = rust_get_current_task(); - return task->sched->number_of_threads(); -} - -extern "C" CDECL size_t -rust_sched_threads() { - rust_task *task = rust_get_current_task(); - return task->sched->max_number_of_threads(); -} - // This is called by an intrinsic on the Rust stack and must run // entirely in the red zone. Do not call on the C stack. extern "C" CDECL MUST_CHECK bool @@ -751,9 +739,14 @@ rust_raw_thread_start(fn_env_pair *fn) { } extern "C" void -rust_raw_thread_join_delete(raw_thread *thread) { +rust_raw_thread_join(raw_thread *thread) { assert(thread); thread->join(); +} + +extern "C" void +rust_raw_thread_delete(raw_thread *thread) { + assert(thread); delete thread; } |
