virtual ~Activity();
public:
+ Activity(Activity const&) = delete;
+ Activity& operator=(Activity const&) = delete;
+
/** Starts a previously created activity.
*
* This function is optional: you can call wait() even if you didn't call start()
void* recv(Mailbox &chan) {
void *res = nullptr;
- Comm c = Comm::recv_init(chan);
+ Comm& c = Comm::recv_init(chan);
c.setDstData(&res,sizeof(res));
c.wait();
return res;
}
void send(Mailbox &chan, void *payload, size_t simulatedSize) {
- Comm c = Comm::send_init(chan);
+ Comm& c = Comm::send_init(chan);
c.setRemains(simulatedSize);
c.setSrcData(payload);
// c.start() is optional.