about summary refs log tree commit diff
path: root/src/rt/rust_port.cpp
AgeCommit message (Collapse)AuthorLines
2013-02-01rt: Remove portsBrian Anderson-153/+0
2012-12-10Add license boilerplate to more files.Graydon Hoare-0/+10
2012-07-13Reintroduce linked failure (rust_port locking)Ben Blum-13/+15
This reverts commit a10f52c5793b358a16e3e98db4b16c65ba8e254b.
2012-07-12Revert linked failure (rust_port locking)Ben Blum-15/+13
This reverts commit 343e9de8ef4ee9727f027c896ce99f09611b9603.
2012-07-12Proper locking with blocked_on()/wakeup() in rust_port. Closes #2787. Closes ↵Ben Blum-13/+15
#1923.
2012-04-03Refactor includes structure, getting rid of rust_internal.hJon Morton-2/+2
Many changes to code structure are included: - removed TIME_SLICE_IN_MS - removed sychronized_indexed_list - removed region_owned - kernel_owned move to kernel.h, task_owned moved to task.h - global configs moved to rust_globals.h - changed #pragma once to standard guard in rust_upcall.h - got rid of memory.h
2012-04-01replace assertion macros with plain assertsJon Morton-3/+3
2012-03-31rt: Rename rust_task_thread to rust_sched_loopBrian Anderson-1/+1
This class no longer represents a thread; it just schedules tasks.
2012-03-18rt: Remove lock_held_by_current_threadBrian Anderson-4/+0
2012-03-17rt: Ports don't need to ref their tasksBrian Anderson-3/+0
Port lifetime is always bounded by their owning task
2012-03-15rt: Look up ports through a single port tableBrian Anderson-2/+2
Instead of a two-level lookup, just use one big table
2012-03-15Zero out dest ptr when port_recv doesn't return a valueMarijn Haverbeke-0/+1
2012-03-06rt: Change the rust_port refcounting scheme to avoid racesBrian Anderson-13/+17
Hopefully...
2012-03-05rt: Add a hack to fix a port detach bugBrian Anderson-0/+4
2012-03-05rt: Fix the atomic get_ref_count method to avoid racesBrian Anderson-7/+0
2012-03-05rt: Properly block tasks while waiting for port detachBrian Anderson-3/+30
2012-03-05rt: Make rust_port_detach less contentiousBrian Anderson-2/+1
It still utterly dominates some benchmarks with busy waiting, but at least it doesn't create lock contention while doing so.
2012-03-05rt: Make linked failure less prone to deadlockBrian Anderson-0/+5
Still a mess.
2012-03-05rt: Move receive code into rust_portBrian Anderson-4/+22
2012-03-05rt: Move some code from rust_port_detach into rust_port::detachBrian Anderson-0/+6
2012-03-05rt: Move some locking from rust_port to rust_taskBrian Anderson-5/+1
2012-03-05rt: Renome rust_task::lock to port_lockBrian Anderson-2/+2
2012-02-16rt: Add rust_port_select functionBrian Anderson-9/+25
2012-02-03rt: Rename rust_scheduler to rust_task_threadBrian Anderson-4/+4
2011-11-16Disconnect ports before draining them. Issue #1155Brian Anderson-1/+8
2011-11-13rt: Add locking invariants to rust_portBrian Anderson-2/+3
2011-11-13Drop enqueued elements when a port is destructed. Closes #1155Brian Anderson-0/+5
2011-11-11rt: Remove rust_chanBrian Anderson-27/+12
2011-11-10rt: Move rust_chan::send to rust_port::sendBrian Anderson-0/+22
2011-11-10rt: Remove rust_token. UnusedBrian Anderson-1/+1
2011-11-10rt: Simplify channel-port associationBrian Anderson-24/+14
It turns out that there's only ever a single channel per port these days, and it always has the same lifetime as the port, so we don't need a list or a complex association protocol.
2011-11-10rt: Remove new_chan. Not neededBrian Anderson-3/+3
2011-10-20Do not pass taskpointers to "rust" native functionsMarijn Haverbeke-2/+2
Issue #466
2011-08-15Port ID-based channels.Eric Holk-0/+7
2011-08-15First step towards port handles.Eric Holk-0/+4
2011-08-05Atomic ref counting for chans.Eric Holk-15/+2
2011-07-29Removing proxies and message queues.Eric Holk-4/+2
2011-07-28Change the locking rules around channel disassociation againBrian Anderson-0/+1
This prevents port's destructor from accessing a deleted channel
2011-07-21Improving move semantics for channel operations.Eric Holk-2/+2
This lets us un-XFAIL task-comm-10.rs.
2011-07-21Lots of work on memory tracking and channels.Eric Holk-1/+2
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-07-13Fix compile-command lines in rt.Graydon Hoare-1/+1
2011-07-07Work on debugging race conditions.Eric Holk-4/+4
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-06-28Removed dom_owned, splitting things between task_owned and kernel_owned. Had ↵Eric Holk-2/+2
to re-xfail a few tests brson recently un-xfailed.
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-9/+8
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-07Move to macro-based logging checks in the C++ codeMarijn Haverbeke-7/+7
No functions should be called for log statements that turn out to be inactive.
2010-09-07Lots of design changes around proxies and message passing. Made it so that ↵Michael Bebenita-3/+3
domains can only talk to other domains via handles, and with the help of the rust_kernel.
2010-08-17Fixed deadlock by removing channel flushing.Michael Bebenita-7/+6
2010-08-11Ignore upcall_flush for channels that are disassociated from ports. This ↵Michael Bebenita-2/+2
makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed.
2010-08-09Synthesize a flush_chan upcall right before a channel's ref_count drops to ↵Michael Bebenita-3/+21
zero. This should only happen in the Rust code and not in the drop glue, or on the unwind path. This change allows the task owning the channel to block on a flush and delete its own channel. This change also cleans up some code around rust_port and rust_chan.