2010-07-28 18:46:13 -05:00
|
|
|
#ifndef RUST_PORT_H
|
|
|
|
#define RUST_PORT_H
|
|
|
|
|
|
|
|
class rust_port : public maybe_proxy<rust_port>,
|
|
|
|
public task_owned<rust_port> {
|
|
|
|
|
|
|
|
public:
|
|
|
|
rust_task *task;
|
|
|
|
size_t unit_sz;
|
|
|
|
ptr_vec<rust_token> writers;
|
|
|
|
ptr_vec<rust_chan> chans;
|
|
|
|
|
|
|
|
// Data sent to this port from remote tasks is buffered in this channel.
|
|
|
|
rust_chan *remote_channel;
|
|
|
|
|
|
|
|
rust_port(rust_task *task, size_t unit_sz);
|
|
|
|
~rust_port();
|
2010-08-09 09:52:07 -05:00
|
|
|
void log_state();
|
2010-08-09 10:15:34 -05:00
|
|
|
bool receive(void *dptr);
|
2010-07-28 18:46:13 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
// Local Variables:
|
|
|
|
// mode: C++
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
|
|
// End:
|
|
|
|
//
|
|
|
|
|
|
|
|
#endif /* RUST_PORT_H */
|