Commit graph

14 commits

Author SHA1 Message Date
Eric Holk
279844ce9f Atomic reference counting for tasks. 2011-07-28 10:47:28 -07:00
Eric Holk
d79afd7916 Improving move semantics for channel operations.
This lets us un-XFAIL task-comm-10.rs.
2011-07-21 11:51:22 -07:00
Eric Holk
3ae4dcd41e Lots of work on memory tracking and channels.
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-21 11:51:22 -07:00
Graydon Hoare
49116adbe9 Fix compile-command lines in rt. 2011-07-13 13:51:20 -07:00
Eric Holk
8acadb17c2 Work on debugging race conditions.
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-07 18:22:27 -07:00
Rob Arnold
4e59b0be54 Sync rust_chan's deref() method with rustc's code.
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-01 16:59:11 -07:00
Rob Arnold
73cc624e8e Move the channel destroy code into rust_chan.
This lets native code more easily destroy channels since directly deleting a
channel is not always the right way to destroy it.
2011-07-01 16:59:10 -07:00
Rob Arnold
09921cf86f Move channel cloning logic into a method on rust_chan.
This will allow us to more easily clone channels from native code.
2011-07-01 16:59:10 -07:00
Michael Bebenita
de611a3090 Lots of design changes around proxies and message passing. Made it so that domains can only talk to other domains via handles, and with the help of the rust_kernel. 2010-09-07 18:44:12 -07:00
Michael Bebenita
97d6342bf0 Synthesize a flush_chan upcall right before a channel's ref_count drops to 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. 2010-08-09 08:15:34 -07:00
Michael Bebenita
4246d567b7 Move ports out into their own file, add data_message and make communication system use it (and proxies) instead of existing token scheme. 2010-07-28 20:30:29 -07:00
Michael Bebenita
9fe4b0d404 Add modeline / file-local emacs var blocks. 2010-07-28 20:30:29 -07:00
Michael Bebenita
00d1465d13 Added a message passing system based on lock free queues for inter-thread communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes. 2010-07-19 14:05:18 -07:00
Graydon Hoare
d6b7c96c3e Populate tree. 2010-06-23 21:03:09 -07:00