summary refs log tree commit diff
path: root/src/rt/rust.cpp
AgeCommit message (Collapse)AuthorLines
2011-07-21Lots of work on memory tracking and channels.Eric Holk-7/+10
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-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-1/+1
2011-06-29Add a runtime flag to enable/disable claims en masseTim Chevalier-0/+6
Now, if the environment variable CHECK_CLAIMS is set, then all claims turn into checks. Otherwise, claims are no-ops.
2011-06-28Renamed what's left of rust_dom to rust_schedulerEric Holk-8/+8
2011-06-28Moved win32_require to the kernel.Eric Holk-3/+3
2011-06-28Fixed Win32 compile errors.Eric Holk-6/+6
2011-06-28Removed dom_owned, splitting things between task_owned and kernel_owned. Had ↵Eric Holk-14/+17
to re-xfail a few tests brson recently un-xfailed.
2011-06-28Moved thread management to rust_kernel.Eric Holk-1/+1
2011-06-28There is only one domain per kernel now.Eric Holk-4/+1
2011-06-27A little tidying in rt.Graydon Hoare-1/+1
2011-06-27Added an environment variable to control how many threads to use.Eric Holk-1/+18
2011-06-27Basic multithreading support. The infinite loops test successfully maxes out ↵Eric Holk-1/+1
the CPU.
2011-06-15Fixed a problem where spawn arguments were getting lost again. Also, fixed ↵Eric Holk-2/+1
up stack alignment, which closes #496
2011-06-15Step 3 of cdecl conversion.Eric Holk-5/+2
2011-06-15Step 2 of cdecl task transition.Eric Holk-13/+3
2011-06-15Step 1 of moving task startup to always be cdecl.Eric Holk-7/+15
2011-06-13This is the mega-ucontext commit. It replaces the task switching mechanism ↵Eric Holk-0/+4
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-06-10Move rt:: logging namespace to ::rt:: and implement RUST_LOG=? and ↵Graydon Hoare-1/+1
RUST_LOG=::help as synonyms that dump the crate logging map. Also warn when some logging specs don't match.
2011-05-31Remove code that is now dead.Rafael Ávila de Espíndola-5/+0
2011-05-31Start finishing up the rust_start signature transition.Rafael Ávila de Espíndola-3/+3
2011-05-26More delicious dead code removal from runtime, upcalls.Graydon Hoare-6/+1
2011-05-25dead argument removal part one.Rafael Ávila de Espíndola-2/+7
2011-05-25Dead code.Rafael Ávila de Espíndola-1/+1
2011-05-24Dead code elimination.Rafael Ávila de Espíndola-1/+1
2011-05-24"constant propagate" rust_new_exit_task_glue to its only use.Rafael Ávila de Espíndola-2/+1
2011-05-18One exit_task_glue to rule them all.Rafael Ávila de Espíndola-1/+1
2011-05-18Remove a bit more dead code.Rafael Ávila de Espíndola-4/+1
2011-05-18Remove dead rustboot code.Rafael Ávila de Espíndola-1/+1
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-4/+5
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-18Add a proper check for rustbootMarijn Haverbeke-4/+2
Uncomment log initialization.
2011-04-18Temporarily turn off logging initializationMarijn Haverbeke-3/+4
Will be restored as soon as I find a way for the runtime to figure out whether it is on rustboot or rustc.
2011-04-18Update foregoing patches to leave rust_crate alone.Marijn Haverbeke-2/+4
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/+2
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-07Move to macro-based logging checks in the C++ codeMarijn Haverbeke-2/+2
No functions should be called for log statements that turn out to be inactive.
2011-02-22Add ABI tagging to crates, adjust rustc output and runtime stack-frame setup ↵Graydon Hoare-3/+5
so access to argv works.
2010-09-07Lots of design changes around proxies and message passing. Made it so that ↵Michael Bebenita-40/+45
domains can only talk to other domains via handles, and with the help of the rust_kernel.
2010-09-07Added a few utility classes, cleaned up the include order of .h files, and ↵Michael Bebenita-1/+2
started to make the Rust kernel own domain message queues rather than the Rust domains themselves.
2010-08-16Pulled rust_srv in its own file. Some cleanup, and added varargs to ↵Michael Bebenita-105/+0
assertion macros.
2010-08-10Merge commit 'jyasskin/work'Graydon Hoare-1/+1
Conflicts: src/rt/rust_dom.cpp src/rt/rust_upcall.cpp
2010-08-09Changed array_list::replace() return behavior.Michael Bebenita-3/+5
2010-08-09Add names to tasks and domains. These can either be an explicit literal stringJeffrey Yasskin-1/+1
after the "spawn" keyword, or implicitly the call expression used to start the spawn.
2010-07-28Fix typos in comments, delete obsolete comments and dead commented code.Michael Bebenita-6/+0
2010-07-28Add a warning interface to rust_srv.Michael Bebenita-0/+10
2010-07-28Move allocation-tracking into rust_srv.Michael Bebenita-10/+11
2010-07-19Added a message passing system based on lock free queues for inter-thread ↵Michael Bebenita-48/+1
communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes.
2010-07-15Add another null byte preceding commandline args passed to the root task, in ↵Roy Frostig-1/+1
position of closure/obj pointer.
2010-07-04Fix bug in win32 command-line arg processing.Graydon Hoare-1/+1
2010-06-23Populate tree.Graydon Hoare-0/+267