/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "src/surf/surf_interface.hpp"
#include "smx_private.h"
#include "xbt/log.h"
sync->name = xbt_strdup("synchro");
sync->synchro.sleep = surf_host_sleep(smx_host, timeout);
- surf_action_set_data(sync->synchro.sleep, sync);
+ sync->synchro.sleep->setData(sync);
XBT_OUT();
return sync;
}
XBT_IN("(%p)",synchro);
XBT_DEBUG("Destroying synchro %p", synchro);
xbt_assert(synchro->type == SIMIX_SYNC_SYNCHRO);
- surf_action_unref(synchro->synchro.sleep);
+ synchro->synchro.sleep->unref();
xbt_free(synchro->name);
xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
XBT_OUT();
{
XBT_IN("(%p)",synchro);
xbt_assert(synchro->type == SIMIX_SYNC_SYNCHRO);
- if (surf_action_get_state(synchro->synchro.sleep) == SURF_ACTION_FAILED)
+ if (synchro->synchro.sleep->getState() == SURF_ACTION_FAILED)
synchro->state = SIMIX_FAILED;
- else if(surf_action_get_state(synchro->synchro.sleep) == SURF_ACTION_DONE)
+ else if(synchro->synchro.sleep->getState() == SURF_ACTION_DONE)
synchro->state = SIMIX_SRC_TIMEOUT;
SIMIX_synchro_finish(synchro);