about summary refs log tree commit diff
path: root/src/rt/rust_log.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-09 18:28:46 -0700
committerbors <bors@rust-lang.org>2013-07-09 18:28:46 -0700
commit41dcec2fe16e272016ae77d10a6a5ff3a737f192 (patch)
tree6eebc49e7033a0d696c93c8e23d7caeb28d4eca1 /src/rt/rust_log.cpp
parent137d1fb210a844a76f89d7355a1aaf9f7a88af33 (diff)
parent413d51e32debf0c3f7dda2434b64d73585df21ef (diff)
downloadrust-41dcec2fe16e272016ae77d10a6a5ff3a737f192.tar.gz
rust-41dcec2fe16e272016ae77d10a6a5ff3a737f192.zip
auto merge of #7265 : brson/rust/io-upstream, r=brson
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism

Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo.

[Here](https://github.com/brson/rust/blob/e1555f9b5628af2b6c6ed344cad621399cb7684d/src/libstd/rt/mod.rs#L201) is the current runtime setup code.

About half of this has already been reviewed.
Diffstat (limited to 'src/rt/rust_log.cpp')
-rw-r--r--src/rt/rust_log.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rt/rust_log.cpp b/src/rt/rust_log.cpp
index df24f569495..8179c53e96d 100644
--- a/src/rt/rust_log.cpp
+++ b/src/rt/rust_log.cpp
@@ -43,11 +43,15 @@ log_console_on() {
  * overridden by the environment.
  */
 void
-log_console_off(rust_env *env) {
+log_console_off() {
     scoped_lock with(_log_lock);
-    if (env->logspec == NULL) {
-        _log_to_console = false;
-    }
+    _log_to_console = false;
+}
+
+bool
+should_log_console() {
+    scoped_lock with(_log_lock);
+    return _log_to_console;
 }
 
 rust_log::rust_log(rust_sched_loop *sched_loop) :