about summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2011-08-03Whitespace cleanupBrian Anderson-1/+1
2011-08-03Add some hacks to get stdin piping working more correctly in windowsBrian Anderson-3/+18
The way pipes work in windows is not the same as unix, though I'm not entirely clear on the differences. This patch changes the windows pipe method to return non-inheritable fds, and the windows rust_run_program method to duplicate them before spawning the new process. This allows make-check-pretty to work on windows.
2011-08-01Adding an intrinsic for recv.Eric Holk-53/+209
2011-08-01Added send and receive to comm library.Eric Holk-21/+35
2011-08-01Enabling logging in circular_buffer again.Eric Holk-46/+44
2011-08-01Objectified library chans and ports.Eric Holk-1/+0
2011-08-01Started working on a library-based comm system. Creating and deleting ports ↵Eric Holk-19/+65
work.
2011-08-01Replace a lock/unlock with scoped_lock in rust_scheduler::create_taskBrian Anderson-3/+5
2011-07-29Minimize scheduler locking on task creationBrian Anderson-1/+2
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-2/+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-29Add sched_threads rt function to get the number of scheduler threadsBrian Anderson-3/+7
2011-07-29Removing proxies and message queues.Eric Holk-687/+64
2011-07-29Merge pull request #781 from robarnold/upstream-stablerobarnold-2/+4
More useful leak debugging output.
2011-07-28Add an assertion about the lock in rust_chan::disassociateBrian Anderson-1/+3
2011-07-28Turn off TRACK_ALLOCATIONSBrian Anderson-1/+1
2011-07-28Change the locking rules around channel disassociation againBrian Anderson-1/+4
This prevents port's destructor from accessing a deleted channel
2011-07-28Fiddle with the locking around channel disassociationBrian Anderson-2/+1
This still looks a bit sketchy to me (why isn't there locking in port::destroy?) but this manages to get rid of a problem with channels accessing their task after it's NULL.
2011-07-28No strnlen on macBrian Anderson-4/+3
2011-07-28When using the allow leaks hack don't even print a warning about the leakBrian Anderson-3/+0
This is only used for the test runner and in that case it just makes the test output confusing
2011-07-28Do all runtime calls to getenv at initializationBrian Anderson-86/+180
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-28Remove color-related code from rust_logBrian Anderson-48/+2
This is all dead. If someone decides they want color it will be easy to redo.
2011-07-28Updating to work on Windows.Eric Holk-6/+15
2011-07-28Re-enabled the rest of the asserts and things in rust_chan.cppEric Holk-12/+11
2011-07-28Resurrecting some of the logging in rust_chan.cppEric Holk-30/+35
2011-07-28Removed outdated comment.Eric Holk-1/+0
2011-07-28Atomic reference counting for tasks.Eric Holk-77/+43
2011-07-28Adding upcalls to to ref() and deref() tasks. This is the first step towards ↵Eric Holk-1/+20
atomic reference counting of tasks.
2011-07-28Made task threads wait instead of sleep, so they can be woken up. This ↵Eric Holk-21/+61
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-28Adding a function to stdlib to set the min stack size, for programsEric Holk-1/+10
that absolutely will not succeed with a large default stack. This should be removed once we have stack grown working. Also updated word-count to succeed under the new test framework.
2011-07-28Per-thread scheduling. Closes #682.Eric Holk-185/+198
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-20/+18
2011-07-28More useful leak debugging output.Rob Arnold-2/+4
When printing out leaked allocations, print the allocation tag and address of the returned pointer.
2011-07-27More thorough check for interior-ness in str_from_ivecMarijn Haverbeke-2/+3
Closes #750
2011-07-26Base scheduler threads on number of cores. Closes #739Brian Anderson-3/+41
2011-07-25remove datalayout from the intrinsics.ll.in file, silence linkage warning.Graydon Hoare-1/+0
2011-07-23Fixed another concurrency issue in channels.Eric Holk-0/+2
2011-07-22More work on word-count.Eric Holk-3/+14
Updated the MapReduce protocol so that it's correct more often. It's still not perfect, but the bugs repro less often now. Also found a race condition in channel sending. The problem is that send and receive both need to refer to the _unread field in circular_buffer. For now I just grabbed the port lock to send. We can probably get around this by using atomics instead.
2011-07-22Fixing a use of uninitialized memory error in valgrind.Eric Holk-2/+2
2011-07-21Bump the stack size and make the RUST_MIN_STACK env variable accept hex values.Michael Sullivan-2/+2
2011-07-21Improving move semantics for channel operations.Eric Holk-11/+12
This lets us un-XFAIL task-comm-10.rs.
2011-07-21Lots of work on memory tracking and channels.Eric Holk-179/+235
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-20Add a huge hack to allow the test runner to continue if a single task leaksBrian Anderson-1/+25
This is just until unwinding works. Adds a flag to the runtime to turn the memory leak checks on task destruction into warnings instead of fatal errors. I am so sorry. Issue #428
2011-07-19Fix calculation of sizeof boxed ivec of str in rt. Closes #712Brian Anderson-1/+6
2011-07-17Revert "Add setenv to standard library"Brian Anderson-16/+0
This reverts commit 6fb168b3dbd733f6fccebd01c2e5416f800a5566.
2011-07-17Add setenv to standard libraryBrian Anderson-0/+16
2011-07-15rustc: Implement interior string logging in DPSPatrick Walton-0/+11
2011-07-15Remove task_unsupervise from rt builtin functionsBrian Anderson-6/+0
This was an exact duplicate of the unsupervise function
2011-07-15Modify task::join to indicate how the task terminatedBrian Anderson-2/+12
This involves sticking yet another field into the task structure
2011-07-14Add task_unsupervise to rustrt.def.inBrian Anderson-0/+1
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.