about summary refs log tree commit diff
path: root/src/rt/rust_internal.h
AgeCommit message (Collapse)AuthorLines
2011-08-18Remove rc_base. Closes #603.Michael Sullivan-10/+2
2011-08-16New channel-based task status notifications.Eric Holk-1/+6
2011-08-16Removed trans_comm.rs from the compiler. Updating aio/sio to work with the ↵Eric Holk-0/+1
new chan and port system, started on a networking module for the standard library.
2011-08-15Reducing the chances for race conditions in join.Eric Holk-1/+4
2011-08-15Working on more spawn test cases.Eric Holk-4/+3
2011-08-15First step towards port handles.Eric Holk-0/+1
2011-08-08Introduced task handles.unknown-0/+2
This is the new way to refer to tasks in rust-land. Currently all they do is serve as a key to look up the old rust_task structure. Ideally they won't be ref counted, but baby steps.
2011-08-05Atomic ref counting for chans.Eric Holk-0/+7
2011-08-03rt: Stub shape glue and implement shape::print and shape::size_of.Patrick Walton-0/+7
2011-08-01Adding an intrinsic for recv.Eric Holk-0/+3
2011-07-29Removing proxies and message queues.Eric Holk-2/+0
2011-07-28Do all runtime calls to getenv at initializationBrian Anderson-0/+1
getenv is not threadsafe and (maybe as a result) it's randomly crashing with CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their own.
2011-07-21Lots of work on memory tracking and channels.Eric Holk-5/+43
We're trying to get closer to doing correct move semantics for channel operations. This involves a lot of cleanup (such as removing the unused sched parameter from rust_vec constructor) and making circular_buffer kernel_owned. Added tagging for memory allocations. This means we give a string tag to everything we allocate. If we leak something and TRACK_ALLOCATIONS is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-13Fix compile-command lines in rt.Graydon Hoare-1/+1
2011-07-07Tightened up the scoping for our various new operators, which shouldEric Holk-0/+10
make it harder to use the wrong one.
2011-07-01Add macro for refcounting runtime structures.Rob Arnold-11/+10
The macro with the extra dtor parameter is intended for structures like rust_chan which may not necessarily delete themselves when the ref count becomes 0. This functionality will be used in an upcoming changeset.
2011-06-28rustc: Rename take glue to copy gluePatrick Walton-1/+1
2011-06-28Resurrecting the runtime unit tests, and modifying them so they compile ↵Eric Holk-0/+4
under the latest refactoring changes.
2011-06-28Renamed what's left of rust_dom to rust_schedulerEric Holk-4/+4
2011-06-28Removed dom_owned, splitting things between task_owned and kernel_owned. Had ↵Eric Holk-36/+5
to re-xfail a few tests brson recently un-xfailed.
2011-06-28Removing runtime tests. The runtime is tested well enough by the standard ↵Eric Holk-4/+0
library tests, so we might as well have less code to fix during refactoring.
2011-06-14Make tydesc glue functions use cdecl.Michael Sullivan-5/+5
2011-06-14Make type_desc fields have useful types and better names. Add in cmp_glue.Michael Sullivan-6/+14
2011-06-13This is the mega-ucontext commit. It replaces the task switching mechanism ↵Eric Holk-2/+3
with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc). This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
2011-05-26More delicious dead code removal from runtime, upcalls.Graydon Hoare-130/+0
2011-05-25Dead code.Rafael Ávila de Espíndola-1/+1
2011-05-25Dead code.Rafael Ávila de Espíndola-69/+0
2011-05-25Dead code.Rafael Ávila de Espíndola-52/+0
2011-05-25dead code.Rafael Ávila de Espíndola-1/+0
2011-05-25Dead code.Rafael Ávila de Espíndola-13/+1
2011-05-25Dead code.Rafael Ávila de Espíndola-14/+1
2011-05-25Dead code.Rafael Ávila de Espíndola-15/+1
2011-05-24Dead code.Rafael Ávila de Espíndola-1/+0
2011-05-24Dead code.Rafael Ávila de Espíndola-6/+0
2011-05-24Only one gc glue.Rafael Ávila de Espíndola-3/+2
2011-05-24There is only one yield glue.Rafael Ávila de Espíndola-3/+2
2011-05-24Remove dead code for unwind_glue.Rafael Ávila de Espíndola-3/+2
2011-05-24There is only one activate function now.Rafael Ávila de Espíndola-1/+0
2011-05-24"constant propagate" rust_new_exit_task_glue to its only use.Rafael Ávila de Espíndola-2/+0
2011-05-18Remove dead code.Rafael Ávila de Espíndola-1/+1
2011-05-18One exit_task_glue to rule them all.Rafael Ávila de Espíndola-1/+2
2011-05-18And yet more dead code.Rafael Ávila de Espíndola-2/+0
2011-05-18Remove a bit more dead code.Rafael Ávila de Espíndola-4/+0
2011-05-08rt: Consistently refer to structs as structs and classes as classes. Clang ↵Patrick Walton-2/+2
complains about this.
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-1/+1
See https://github.com/graydon/rust/wiki/Logging-vision The runtime logging categories are now treated in the same way as modules in compiled code. Each domain now has a log_lvl that can be used to restrict the logging from that domain (will be used to allow logging to be restricted to a single domain). Features dropped (can be brought back to life if there is interest): - Logger indentation - Multiple categories per log statement - I possibly broke some of the color code -- it confuses me
2011-04-18Update foregoing patches to leave rust_crate alone.Marijn Haverbeke-5/+0
Apparently it can't live in the main binary, since on non-Linux platforms, dynamics libs won't find symbols in the binary. This removes the crate_map pointer from rust_crate again, and instead passes it as an extra argument to rust_start. Rustboot doesn't pass this argument, but supposedly that's okay as long as we don't actually use it on that platform.
2011-04-18Make log the log level configurable per moduleMarijn Haverbeke-0/+5
This overloads the meaning of RUST_LOG to also allow 'module.submodule' or 'module.somethingelse=2' forms. The first turn on all logging for a module (loglevel 3), the second sets its loglevel to 2. Log levels are: 0: Show only errors 1: Errors and warnings 2: Errors, warnings, and notes 3: Everything, including debug logging Right now, since we only have one 'log' operation, everything happens at level 1 (warning), so the only meaningful thing that can be done with the new RUST_LOG support is disable logging (=0) for some modules. TODOS: * Language support for logging at a specific level * Also add a log level field to tasks, query the current task as well as the current module before logging (log if one of them allows it) * Revise the C logging API to conform to this set-up (globals for per-module log level, query the task level before logging, stop using a global mask) Implementation notes: Crates now contain two extra data structures. A 'module map' that contains names and pointers to the module-log-level globals for each module in the crate that logs, and a 'crate map' that points at the crate's module map, as well as at the crate maps of all external crates it depends on. These are walked by the runtime (in rust_crate.cpp) to set the currect log levels based on RUST_LOG. These module log globals are allocated as-needed whenever a log expression is encountered, and their location is hard-coded into the logging code, which compares the current level to the log statement's level, and skips over all logging code when it is lower.
2011-04-08add -O2 when compiling rt, fix warnings triggered by optimizerMarijn Haverbeke-1/+1
2011-03-25A first stab at the 'nbody' demo, with support for calling C sqrt().Lindsey Kuper-0/+1
2011-03-14Add functionality for running external programs to the std libMarijn Haverbeke-4/+5
See lib/run_program.rs.