about summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2011-07-14Modify upcall_fail so that failing tasks relinquish control to the schedulerBrian Anderson-0/+3
This is sufficient to let unsupervised tasks that don't allocate fail without crashing or leaking.
2011-07-14Add an unsupervise builtin and function to std::taskBrian Anderson-0/+5
Calling task::unsupervise de-parents the current task, with the result that failures do not propogate up the task tree.
2011-07-14Move the responsibility for process failure from tasks to the schedulerBrian Anderson-3/+3
When the root task fails the process fails. Failures on other tasks propagate up the task tree. Failures on non-root tasks without parents just (theoretically) unwind and disappear.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-36/+35
2011-07-13Trim a few more fail(1)s, not sure how they slipped past.Graydon Hoare-3/+3
2011-07-13Remove 'Nop.' comments, add emacs lines, remove obsolete file.Graydon Hoare-26/+11
2011-07-13Fix compile-command lines in rt.Graydon Hoare-24/+24
2011-07-13Remove obsolete nargs counts from runtime.Graydon Hoare-36/+33
2011-07-13Attempt to correct buggy win32 timer code (causing tinderbox failures).Graydon Hoare-36/+42
2011-07-12stdlib: Move fs over to interior vectors by introducing a ↵Patrick Walton-1/+40
rust_list_files_ivec builtin
2011-07-12rt: Remove the locks around upcall_shared_malloc and upcall_shared_freePatrick Walton-2/+1
2011-07-11stdlib: Add addr_of() to the standard libraryPatrick Walton-0/+12
2011-07-10rt: Remove the now-unused upcall_ivec_resize and upcall_ivec_spill, which ↵Patrick Walton-42/+0
allocated from the wrong heap
2011-07-10rt: Remove the _2 prefix from intrinsics; all rust-intrinsics now use ↵Patrick Walton-62/+7
explicit return pointers
2011-07-09rustc: Make rust-intrinsics take an explicit return pointerPatrick Walton-12/+72
2011-07-09stdlib: Implement casts. The horror.Patrick Walton-0/+46
2011-07-08stdlib: Implement str::unsafe_from_bytes_ivec()Patrick Walton-0/+21
2011-07-08stdlib: Add an offset function for simple pointer arithmetic on unsafe pointersPatrick Walton-23/+39
2011-07-08Added an environment variable to override the minimum stack size. Closes #637.Eric Holk-1/+10
2011-07-07Some cleanupEric Holk-8/+1
2011-07-07Fixed two races.Eric Holk-0/+10
The first is that the memory_region destructor would complain there is still an outstanding allocation. This is because circular_buffer from rust_chan wasn't refing its task, so the task was being destructed too soon. The second was where the program could deadlock while joining a task. The target task would die in the time between checking whether the task should block and then actually blocking. The fix is to use the target task's lock.
2011-07-07Made TRACK_ALLOCATIONS add only constant time overhead. This makes itEric Holk-5/+48
feasible to turn it on and run rustc.
2011-07-07Tightened up the scoping for our various new operators, which shouldEric Holk-11/+34
make it harder to use the wrong one.
2011-07-07Work on debugging race conditions.Eric Holk-35/+90
Ports and channels have been moved to the kernel pool, since they've been known to outlive their associated task. This probably isn't the right thing to do, the life cycle needs fixed instead. Some refactorying in memory_region.cpp. Added a helper function to increment and decrement the allocation counter. This makes it easier to switch between atomic and non-atomic increments. Using atomic increments for now, although this still does not fix the problem.
2011-07-07Removing the synchronized memory region from tasks.Eric Holk-98/+21
2011-07-07Removing most of the locks in rust_upcall.cpp and elsewhere.Eric Holk-75/+46
2011-07-06Allocate rust_ivec buffers out of the kernel poolRob Arnold-0/+138
The duplication of upcalls is due to the fact that the runtime is shared between stage0/rustc and stage1/rustc. Once snapshots are updated, they should be de-duplicated.
2011-07-06Add realloc method to rust_kernelRob Arnold-0/+6
2011-07-06rt: Double stack sizePatrick Walton-1/+1
2011-07-06rt: Add a stack check to upcall_get_type_descPatrick Walton-0/+29
2011-07-06Removed what seems to be the last of the calls to rand(). Closes #582.Eric Holk-7/+2
2011-07-06Added a task wakeup callback. Closes #599.Eric Holk-2/+22
The callback happens when a task moves from the "blocked" state to the "running" state. The callback is also inherited by child tasks. There is currently only a native API. This code hasn't been heavily exercised yet.
2011-07-05rt: Add missing CDECL to routines in rust_builtinPatrick Walton-6/+6
2011-07-01Sync rust_chan's deref() method with rustc's code.Rob Arnold-2/+3
If the channel is associated with a port then the destructor will assert. Additionally, destruction of the object is not always appropriate. This brings the deref() method into sync with the behavior of generated rust code which only invokes destroy() once the reference count goes to 0.
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-07-01Move the channel destroy code into rust_chan.Rob Arnold-29/+39
This lets native code more easily destroy channels since directly deleting a channel is not always the right way to destroy it.
2011-07-01Move channel cloning logic into a method on rust_chan.Rob Arnold-15/+22
This will allow us to more easily clone channels from native code.
2011-06-30rt: Add room for the new fill slot when resizing interior vectorsPatrick Walton-1/+1
2011-06-30Added a nanosecond timer to time.rs, support for some floating point casts, ↵Eric Holk-6/+19
and a commandline-driven mode for pfib.rs
2011-06-29Added inheritance for task pinning. Closes #598 for real.Eric Holk-0/+9
2011-06-29Adding support for pinning tasks to the currently running thread. Closes #598.Eric Holk-17/+42
2011-06-29Re-enable tidy (it was broken) and fix various non-tidy things.Graydon Hoare-11/+19
2011-06-29Add a runtime flag to enable/disable claims en masseTim Chevalier-0/+11
Now, if the environment variable CHECK_CLAIMS is set, then all claims turn into checks. Otherwise, claims are no-ops.
2011-06-29Don't enable ssp everywhere.Rafael Ávila de Espíndola-2/+2
2011-06-29rt: Remove the lock around upcall_vec_append. Add a test case. Closes #156.Patrick Walton-1/+0
2011-06-28rustc: Move duplicate_heap_parts to copy glue; add a test casePatrick Walton-3/+2
2011-06-28rustc: Rename take glue to copy gluePatrick Walton-4/+5
2011-06-28Re-enabling some tests.Eric Holk-2/+2
2011-06-28Resurrecting the runtime unit tests, and modifying them so they compile ↵Eric Holk-2/+305
under the latest refactoring changes.
2011-06-28Renamed what's left of rust_dom to rust_schedulerEric Holk-319/+301