simcall_process_sleep(duration);
}
-void s4u::Actor::execute(double flops) {
- simcall_process_execute(NULL,flops,1.0/*priority*/,0./*bound*/, 0L/*affinity*/);
+e_smx_state_t s4u::Actor::execute(double flops) {
+ smx_synchro_t s = simcall_process_execute(NULL,flops,1.0/*priority*/,0./*bound*/, 0L/*affinity*/);
+ return simcall_process_execution_wait(s);
}
-char *s4u::Actor::recvstr(Mailbox &chan) {
+void *s4u::Actor::recv(Mailbox &chan) {
void *res=NULL;
Comm c = Comm::recv_init(this, chan);
c.setDstData(&res,sizeof(res));
c.wait();
- return (char*)res;
+ return res;
}
-void s4u::Actor::sendstr(Mailbox &chan, const char*msg) {
+void s4u::Actor::send(Mailbox &chan, void *payload, size_t simulatedSize) {
Comm c = Comm::send_init(this,chan);
- c.setRemains(strlen(msg));
- c.setSrcData(xbt_strdup(msg),sizeof(char*));
+ c.setRemains(simulatedSize);
+ c.setSrcData(payload);
c.wait();
}