smx_cond_t cond = xbt_new0(s_smx_cond_t, 1);
cond->sleeping = xbt_swag_new(xbt_swag_offset(p, synchro_hookup));
cond->mutex = nullptr;
- cond->refcount_ = 1;
+ cond->refcount_ = 0;
+ intrusive_ptr_add_ref(cond);
XBT_OUT();
return cond;
}
XBT_OUT();
}
- /**
- * \brief Destroys a condition.
- *
- * Destroys and frees the condition's memory.
- * \param cond A condition
- */
+ smx_cond_t SIMIX_cond_ref(smx_cond_t cond)
+ {
+ if (cond != nullptr)
+ intrusive_ptr_add_ref(cond);
+ return cond;
+ }
+
void SIMIX_cond_unref(smx_cond_t cond)
{
XBT_IN("(%p)",cond);
void intrusive_ptr_add_ref(s_smx_cond_t *cond)
{
auto previous = (cond->refcount_)++;
- xbt_assert(previous != 0);
(void) previous;
}
src/surf/AsCluster.hpp
src/surf/AsClusterFatTree.hpp
src/surf/AsClusterTorus.hpp
+ src/surf/AsClusterDragonfly.hpp
src/surf/AsDijkstra.hpp
src/surf/AsFloyd.hpp
src/surf/AsFull.hpp
src/surf/AsCluster.cpp
src/surf/AsClusterFatTree.cpp
src/surf/AsClusterTorus.cpp
+ src/surf/AsClusterDragonfly.cpp
src/surf/AsDijkstra.cpp
src/surf/AsFloyd.cpp
src/surf/AsFull.cpp
src/s4u/s4u_host.cpp
src/s4u/s4u_mailbox.cpp
src/s4u/s4u_mutex.cpp
+ src/s4u/s4u_conditionVariable.cpp
src/s4u/s4u_storage.cpp
)
include/simgrid/s4u/host.hpp
include/simgrid/s4u/mailbox.hpp
include/simgrid/s4u/mutex.hpp
+ include/simgrid/s4u/conditionVariable.hpp
include/simgrid/s4u/storage.hpp
include/simgrid/s4u.h
include/simgrid/plugins/energy.h
examples/platforms/cluster_and_one_host.xml
examples/platforms/cluster_prototype.lua
examples/platforms/cluster_no_backbone.xml
+ examples/platforms/cluster_torus.xml
+ examples/platforms/cluster_fat_tree.xml
+ examples/platforms/cluster_dragonfly.xml
examples/platforms/crosstraffic.xml
examples/platforms/optorsim/gridpp_grid_2004.conf
examples/platforms/optorsim/lcg_sept2004_grid.conf
examples/platforms/dogbone.xml
examples/platforms/energy_platform.xml
examples/platforms/faulty_host.xml
- examples/platforms/fat_tree_cluster.xml
examples/platforms/g5k.xml
examples/platforms/griffon.xml
examples/platforms/meta_cluster.xml
examples/platforms/syscoord/median_meridian.syscoord
examples/platforms/syscoord/median_p2psim.syscoord
examples/platforms/three_multicore_hosts.xml
- examples/platforms/torus_cluster.xml
examples/platforms/two_clusters.xml
examples/platforms/two_hosts.xml
examples/platforms/two_hosts_platform_shared.xml