aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_internal.h
Commit message (Collapse)AuthorAgeFilesLines
* rt: Consistently refer to structs as structs and classes as classes. Clang ↵Patrick Walton2011-05-081-2/+2
| | | | complains about this.
* Overhaul logging system in runtimeMarijn Haverbeke2011-04-191-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
* Update foregoing patches to leave rust_crate alone.Marijn Haverbeke2011-04-181-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.
* Make log the log level configurable per moduleMarijn Haverbeke2011-04-181-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.
* add -O2 when compiling rt, fix warnings triggered by optimizerMarijn Haverbeke2011-04-081-1/+1
|
* A first stab at the 'nbody' demo, with support for calling C sqrt().Lindsey Kuper2011-03-251-0/+1
|
* Add functionality for running external programs to the std libMarijn Haverbeke2011-03-141-4/+5
| | | | See lib/run_program.rs.
* Add ABI tagging to crates, adjust rustc output and runtime stack-frame setup ↵Graydon Hoare2011-02-221-0/+6
| | | | so access to argv works.
* Further corrections to the logging layer in runtime.Graydon Hoare2011-01-141-1/+1
|
* Change log buffer butes to a symbolic const in runtime.Graydon Hoare2011-01-141-0/+4
|
* Support a special const-value refcount, use it for const strings.Graydon Hoare2010-11-091-0/+7
|
* Cleanup, refactoring, and some runtime tests.Michael Bebenita2010-09-101-3/+4
|
* Tidy up the sync dir, remove dead or mis-designed code in favour of OS ↵Graydon Hoare2010-09-081-1/+1
| | | | primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin.
* Lots of design changes around proxies and message passing. Made it so that ↵Michael Bebenita2010-09-071-8/+20
| | | | domains can only talk to other domains via handles, and with the help of the rust_kernel.
* Added a few utility classes, cleaned up the include order of .h files, and ↵Michael Bebenita2010-09-071-56/+35
| | | | started to make the Rust kernel own domain message queues rather than the Rust domains themselves.
* Lots of changes around memory managment in the Runtime. Added memory regions ↵Michael Bebenita2010-08-171-19/+1
| | | | and fixed race caused by calling rust_srv::malloc() from multiple threads when sending messages.
* Pulled rust_srv in its own file. Some cleanup, and added varargs to ↵Michael Bebenita2010-08-161-7/+9
| | | | assertion macros.
* Added support for task sleeping in the scheduler.Michael Bebenita2010-08-111-0/+1
|
* Made ref_count a word sized value.Michael Bebenita2010-08-111-1/+1
|
* Fixed deadlock in the scheduler caused by condition variables.Michael Bebenita2010-08-091-0/+1
|
* Added peek() to ptr_vec.Michael Bebenita2010-08-091-0/+1
|
* Made ref_count signed to help detect negative ref_count bugs.Michael Bebenita2010-08-091-1/+1
|
* Move ports out into their own file, add data_message and make communication ↵Michael Bebenita2010-07-281-28/+2
| | | | system use it (and proxies) instead of existing token scheme.
* Teach task_owned and dom_owned to find their dom via consistent interface.Michael Bebenita2010-07-281-0/+6
|
* Move rust_cond.Michael Bebenita2010-07-281-9/+7
|
* Fix typos in comments, delete obsolete comments and dead commented code.Michael Bebenita2010-07-281-19/+0
|
* Add a warning interface to rust_srv.Michael Bebenita2010-07-281-2/+4
|
* Notify copy glue of dst-initialization and fix _vec.alloc issues in lib and ↵Roy Frostig2010-07-221-0/+1
| | | | runtime. Closes #109.
* Back out too-platform-fussy bits in preempt-test work. I hate this test.Graydon Hoare2010-07-221-11/+0
|
* Beat up on the preempt test a bit more, as it keeps hanging under valgrind.Graydon Hoare2010-07-221-0/+11
|
* Added a message passing system based on lock free queues for inter-thread ↵Michael Bebenita2010-07-191-173/+50
| | | | communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes.
* Change from 'spawner' to 'supervisor' in rust_task, and add an unsupervise call.Graydon Hoare2010-07-051-1/+4
|
* Move more of the GC logic into the runtime.Graydon Hoare2010-06-281-1/+22
|
* Add sever-glue, for missing first stage of sweep.Graydon Hoare2010-06-251-0/+1
|
* Add rust_task::gc(size_t args) method that drops us back into the GC glue.Graydon Hoare2010-06-251-0/+3
|
* Emit gc glue and rearrange crate glue offsets slightly to have a regular order.Graydon Hoare2010-06-251-4/+7
|
* Populate tree.Graydon Hoare2010-06-231-0/+730