diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-08-08 18:09:42 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-08-15 09:26:51 -0700 |
| commit | 04af99ecb0dee1cb3df0032f7e7ba08ffc6c5bd4 (patch) | |
| tree | 7fdf9e23831a55a67f110565e907260b70421704 /src/rt/rust_task.h | |
| parent | a21ebb2f5ec5f158c3a2bbbccb76980624b1815f (diff) | |
| download | rust-04af99ecb0dee1cb3df0032f7e7ba08ffc6c5bd4.tar.gz rust-04af99ecb0dee1cb3df0032f7e7ba08ffc6c5bd4.zip | |
First step towards port handles.
Diffstat (limited to 'src/rt/rust_task.h')
| -rw-r--r-- | src/rt/rust_task.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index be7a774db92..4286aaa8b41 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -59,6 +59,7 @@ rust_task : public kernel_owned<rust_task>, rust_cond size_t gc_alloc_accum; rust_task_id id; + rust_port_id next_port_id; // Keeps track of the last time this task yielded. timer yield_timer; @@ -96,6 +97,8 @@ rust_task : public kernel_owned<rust_task>, rust_cond lock_and_signal lock; + hash_map<rust_port_id, rust_port *> port_table; + // Only a pointer to 'name' is kept, so it must live as long as this task. rust_task(rust_scheduler *sched, rust_task_list *state, @@ -161,6 +164,10 @@ rust_task : public kernel_owned<rust_task>, rust_cond void unpin(); void on_wakeup(wakeup_callback *callback); + + rust_port_id register_port(rust_port *port); + void release_port(rust_port_id id); + rust_port *get_port_by_id(rust_port_id id); }; // |
