diff options
| author | Michael Bebenita <[email protected]> | 2010-07-28 16:46:13 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-28 20:30:29 -0700 |
| commit | 4246d567b7a999155524669e3b0419e8f71080b1 (patch) | |
| tree | 38ab4d3aa04b25e37db9e663890235edf2f3a8a6 /src/rt/rust_internal.h | |
| parent | Move notification-messages out into their own file and unify into notify_mess... (diff) | |
| download | rust-4246d567b7a999155524669e3b0419e8f71080b1.tar.xz rust-4246d567b7a999155524669e3b0419e8f71080b1.zip | |
Move ports out into their own file, add data_message and make communication system use it (and proxies) instead of existing token scheme.
Diffstat (limited to 'src/rt/rust_internal.h')
| -rw-r--r-- | src/rt/rust_internal.h | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index bc5835fe..a89144d7 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -580,37 +580,11 @@ struct gc_alloc { } }; +#include "circular_buffer.h" #include "rust_proxy.h" #include "rust_task.h" - -struct rust_port : public rc_base<rust_port>, - public task_owned<rust_port>, - public rust_cond { - rust_task *task; - size_t unit_sz; - ptr_vec<rust_token> writers; - ptr_vec<rust_chan> chans; - - rust_port(rust_task *task, size_t unit_sz); - ~rust_port(); -}; - -struct rust_token : public rust_cond { - rust_chan *chan; // Link back to the channel this token belongs to - size_t idx; // Index into port->writers. - bool submitted; // Whether token is in a port->writers. - - rust_token(rust_chan *chan); - ~rust_token(); - - bool pending() const; - void submit(); - void withdraw(); -}; - -#include "circular_buffer.h" - #include "rust_chan.h" +#include "rust_port.h" // // Local Variables: |