#else
process->privatized(false);
#endif
- modelChecker_ = std::unique_ptr<ModelChecker>(
- new simgrid::mc::ModelChecker(std::move(process)));
+ modelChecker_.reset(new simgrid::mc::ModelChecker(std::move(process)));
xbt_assert(mc_model_checker == nullptr);
mc_model_checker = modelChecker_.get();
mc_model_checker->start();
xbt_dynar_get_as(initial_communications_pattern, issuer->get_pid(), simgrid::mc::PatternCommunicationList*);
xbt_dynar_t incomplete_pattern = xbt_dynar_get_as(incomplete_communications_pattern, issuer->get_pid(), xbt_dynar_t);
- std::unique_ptr<simgrid::mc::PatternCommunication> pattern =
- std::unique_ptr<simgrid::mc::PatternCommunication>(new simgrid::mc::PatternCommunication());
+ std::unique_ptr<simgrid::mc::PatternCommunication> pattern(new simgrid::mc::PatternCommunication());
pattern->index = initial_pattern->index_comm + xbt_dynar_length(incomplete_pattern);
if (call_type == MC_CALL_TYPE_SEND) {
completed = 1;
simgrid::mc::PatternCommunication* temp;
xbt_dynar_remove_at(xbt_dynar_get_as(incomplete_communications_pattern, issuer, xbt_dynar_t), cursor, &temp);
- comm_pattern = std::unique_ptr<simgrid::mc::PatternCommunication>(temp);
+ comm_pattern.reset(temp);
XBT_DEBUG("Remove incomplete comm pattern for process %u at cursor %u", issuer, cursor);
break;
}
// TODO, make this a field of ModelChecker or something similar
if (state_comparator == nullptr)
- state_comparator = std::unique_ptr<StateComparator>(new StateComparator());
+ state_comparator.reset(new StateComparator());
else
state_comparator->clear();
xbt_die("Unexpected socket type %i", type);
XBT_DEBUG("Model-checked application found expected socket type");
- instance_ = std::unique_ptr<Client>(new simgrid::mc::Client(fd));
+ instance_.reset(new simgrid::mc::Client(fd));
// Wait for the model-checker:
errno = 0;
{
// Read/dereference/refresh the std_heap pointer:
if (not this->heap)
- this->heap = std::unique_ptr<s_xbt_mheap_t>(new s_xbt_mheap_t());
+ this->heap.reset(new s_xbt_mheap_t());
this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address), simgrid::mc::ProcessIndexDisabled);
this->cache_flags_ |= RemoteClient::cache_heap;
}
void helper_tests::Init()
{
pagesize = (size_t)getpagesize();
- store = std::unique_ptr<PageStore>(new simgrid::mc::PageStore(50));
+ store.reset(new simgrid::mc::PageStore(50));
data = mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
REQUIRE(store->size() == 0);
}
REQUIRE(xbt_pagesize == getpagesize());
REQUIRE(1 << xbt_pagebits == xbt_pagesize);
- process = std::unique_ptr<simgrid::mc::RemoteClient>(new simgrid::mc::RemoteClient(getpid(), -1));
+ process.reset(new simgrid::mc::RemoteClient(getpid(), -1));
process->init();
mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process));
}
#endif
if (simix_global == nullptr) {
- simix_global = std::unique_ptr<simgrid::simix::Global>(new simgrid::simix::Global());
+ simix_global.reset(new simgrid::simix::Global());
simix_global->maestro_process = nullptr;
surf_init(argc, argv); /* Initialize SURF structures */
{
#ifdef __GXX_ABI_VERSION
int status;
- auto res = std::unique_ptr<char, std::function<void(char*)>>(abi::__cxa_demangle(name, nullptr, nullptr, &status),
- &std::free);
+ std::unique_ptr<char, std::function<void(char*)>> res(abi::__cxa_demangle(name, nullptr, nullptr, &status),
+ &std::free);
if (res != nullptr)
return res;
// We did not manage to resolve this. Probably because this is not a mangled symbol: