about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
AgeCommit message (Collapse)AuthorLines
2011-09-20rt: Rename rand() to isaac_rand() since the former prevents lots of standard ↵Patrick Walton-1/+1
headers from being included
2011-09-11Use a unique exit status when the runtime fails normallyBrian Anderson-1/+1
Check for it in run-fail tests
2011-08-24Return an error code after fail under win32Brian Anderson-1/+1
2011-08-17Making more of the rust_task structure directly accessible from Rust.Eric Holk-3/+3
2011-08-15Abort abruptly on failure on windowsBrian Anderson-0/+6
Trying to shutdown cleanly results in wierd failures
2011-08-15Reducing the chances for race conditions in join.Eric Holk-1/+11
2011-08-15Properly ref counting to fix valgrind issues on linux.Eric Holk-0/+1
2011-08-10rt: Shutdown gracefully on failureBrian Anderson-0/+8
When the kernel fails, kill all tasks and wait for the schedulers to stop instead of just exiting. I'm sure there are tons of lurking issues here but this is enough to fail without leaking (at least in the absence of cleanups).
2011-08-08Introduced task handles.unknown-2/+24
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-07-29Minimize scheduler locking on task creationBrian Anderson-1/+0
This takes my CPU utilization on task-perf-spawnalot from 35% to 55%
2011-07-29Lock the new task's scheduler when creating a taskBrian Anderson-1/+3
Previously we were locking the spawning task's scheduler. I couldn't see that that was protecting anything. The newborn_task list in the new task's scheduler though was unprotected from concurrent access. So now we're locking the new task's scheduler.
2011-07-29Removing proxies and message queues.Eric Holk-136/+3
2011-07-28Do all runtime calls to getenv at initializationBrian Anderson-1/+4
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-28Updating to work on Windows.Eric Holk-2/+4
2011-07-28Resurrecting some of the logging in rust_chan.cppEric Holk-18/+14
2011-07-28Removed outdated comment.Eric Holk-1/+0
2011-07-28Made task threads wait instead of sleep, so they can be woken up. This ↵Eric Holk-5/+11
appears to give us much better parallel performance. Also, commented out one more unsafe log and updated rust_kernel.cpp to compile under g++
2011-07-28Per-thread scheduling. Closes #682.Eric Holk-45/+40
Tasks are spawned on a random thread. Currently they stay there, but we should add task migration and load balancing in the future. This should drammatically improve our task performance benchmarks.
2011-07-28Made root_task no longer special.Eric Holk-0/+5
2011-07-21Lots of work on memory tracking and channels.Eric Holk-15/+13
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-3/+3
2011-07-13Fix compile-command lines in rt.Graydon Hoare-1/+1
2011-07-06Add realloc method to rust_kernelRob Arnold-0/+5
2011-07-06rt: Add a stack check to upcall_get_type_descPatrick Walton-0/+11
2011-06-29Re-enable tidy (it was broken) and fix various non-tidy things.Graydon Hoare-6/+9
2011-06-28Renamed what's left of rust_dom to rust_schedulerEric Holk-37/+36
2011-06-28Moved win32_require to the kernel.Eric Holk-0/+19
2011-06-28Moved thread management to rust_kernel.Eric Holk-0/+31
2011-06-28There is only one domain per kernel now.Eric Holk-28/+13
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-05-24Dead code elimination.Rafael Ávila de Espíndola-2/+2
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-14/+12
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-07Avoid some gotchas with logging macrosBrian Anderson-3/+5
I think this is sufficient to eliminate multiple evaluation and the possibility of accidental miscompilation from the logging macros.
2011-04-07Move to macro-based logging checks in the C++ codeMarijn Haverbeke-12/+15
No functions should be called for log statements that turn out to be inactive.
2011-01-14Further corrections to the logging layer in runtime.Graydon Hoare-1/+1
2010-09-16Fixed deadlock caused by the message pump not being notified of new message ↵Michael Bebenita-3/+18
sends.
2010-09-10Cleanup, refactoring, and some runtime tests.Michael Bebenita-5/+7
2010-09-10Added lock_and_signal::signal_all(), and made the rust_kernel::join() use ↵Michael Bebenita-5/+6
wait instead of yield.
2010-09-08Fixed lost signal notifications.Michael Bebenita-2/+4
2010-09-08Tidy up the sync dir, remove dead or mis-designed code in favour of OS ↵Graydon Hoare-25/+16
primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin.
2010-09-08XFAIL many.rs since it crashes on win32, and add a time-slice sleep to the ↵Graydon Hoare-1/+24
kernel message loop to get tests to finish in a sane time.
2010-09-08Cleaned up locking in the kernel.Michael Bebenita-40/+42
2010-09-07Fixed race in the rust kernel.Michael Bebenita-17/+30
2010-09-07Lots of design changes around proxies and message passing. Made it so that ↵Michael Bebenita-9/+161
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-0/+43
started to make the Rust kernel own domain message queues rather than the Rust domains themselves.