X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4afe4eabf76e9bb40b728e96ac1de3039029ffc6..3b184825e827891e4dd8f86425cb83842abfa5e7:/docs/source/app_s4u.rst diff --git a/docs/source/app_s4u.rst b/docs/source/app_s4u.rst index b1be68449c..be1381f43d 100644 --- a/docs/source/app_s4u.rst +++ b/docs/source/app_s4u.rst @@ -598,6 +598,7 @@ Reacting to the end of actors .. doxygenfunction:: simgrid::s4u::Actor::join() const .. doxygenfunction:: simgrid::s4u::Actor::join(double timeout) const .. doxygenfunction:: simgrid::s4u::Actor::set_auto_restart(bool autorestart) + .. doxygenfunction:: simgrid::s4u::Actor::get_restart_count() .. group-tab:: Python @@ -701,6 +702,7 @@ Logging messages .. autofunction:: simgrid.this_actor.debug .. autofunction:: simgrid.this_actor.info + .. autofunction:: simgrid.this_actor.warning .. autofunction:: simgrid.this_actor.error Sleeping @@ -957,6 +959,7 @@ Signals .. doxygenfunction:: simgrid::s4u::Engine::on_deadlock_cb .. doxygenfunction:: simgrid::s4u::Engine::on_platform_created_cb .. doxygenfunction:: simgrid::s4u::Engine::on_platform_creation_cb + .. doxygenfunction:: simgrid::s4u::Engine::on_simulation_start_cb .. doxygenfunction:: simgrid::s4u::Engine::on_simulation_end_cb .. doxygenfunction:: simgrid::s4u::Engine::on_time_advance_cb @@ -1046,6 +1049,7 @@ Sending data .. automethod:: simgrid.Mailbox.put .. automethod:: simgrid.Mailbox.put_async + .. automethod:: simgrid.Mailbox.put_init .. group-tab:: C @@ -1067,7 +1071,7 @@ Receiving data .. doxygenfunction:: simgrid::s4u::Mailbox::get(double timeout) .. doxygenfunction:: simgrid::s4u::Mailbox::get_async(T **data) .. doxygenfunction:: simgrid::s4u::Mailbox::get_init() - .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, bool(*match_fun)(void *, void *, kernel::activity::CommImpl *), void *data) + .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, const std::function& match_fun, void *data) .. doxygenfunction:: simgrid::s4u::Mailbox::listen .. doxygenfunction:: simgrid::s4u::Mailbox::ready @@ -1328,7 +1332,6 @@ Querying info .. group-tab:: C .. doxygenfunction:: sg_host_core_count(const_sg_host_t host) - .. doxygenfunction:: sg_host_dump(const_sg_host_t ws) .. doxygenfunction:: sg_host_get_name(const_sg_host_t host) .. doxygenfunction:: sg_host_get_load(const_sg_host_t host) .. doxygenfunction:: sg_host_get_speed(const_sg_host_t host) @@ -2161,7 +2164,6 @@ Basic management #include .. doxygentypedef:: sg_comm_t - .. doxygentypedef:: const_sg_comm_t Querying info ------------- @@ -2176,13 +2178,17 @@ Querying info .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff) .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size) .. doxygenfunction:: simgrid::s4u::Comm::detach() - .. doxygenfunction:: simgrid::s4u::Comm::detach(void(*clean_function)(void *)) + .. doxygenfunction:: simgrid::s4u::Comm::detach(const std::function& clean_function) .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(uint64_t bytes) .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate) .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff) .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size) .. doxygenfunction:: simgrid::s4u::Comm::set_src_data_size(size_t size) + .. group-tab:: Python + + .. automethod:: simgrid.Comm.detach + Life cycle ---------- @@ -2213,8 +2219,11 @@ also start direct communications as shown below. .. automethod:: simgrid.Comm.test .. automethod:: simgrid.Comm.wait + .. automethod:: simgrid.Comm.wait_for .. automethod:: simgrid.Comm.wait_all + .. automethod:: simgrid.Comm.wait_all_for .. automethod:: simgrid.Comm.wait_any + .. automethod:: simgrid.Comm.wait_any_for .. group-tab:: C @@ -2437,7 +2446,15 @@ Synchronization Objects ⁣  Mutex ============== -.. doxygenclass:: simgrid::s4u::Mutex +.. tabs:: + + .. group-tab:: C++ + + .. doxygenclass:: simgrid::s4u::Mutex + + .. group-tab:: Python + + .. autoclass:: simgrid.Mutex Basic management ---------------- @@ -2454,6 +2471,19 @@ Basic management .. doxygenfunction:: simgrid::s4u::Mutex::create() + .. group-tab:: Python + + .. code-block:: Python + + from simgrid import Mutex + mutex = Mutex() + + # Use a context manager to acquire and automatically release the mutex + # when leaving the scope. + with mutex: + # Access shared resource ... + pass + .. group-tab:: C .. code-block:: C @@ -2479,6 +2509,12 @@ Locking .. doxygenfunction:: simgrid::s4u::Mutex::try_lock() .. doxygenfunction:: simgrid::s4u::Mutex::unlock() + .. group-tab:: Python + + .. automethod:: simgrid.Mutex.lock() + .. automethod:: simgrid.Mutex.try_lock() + .. automethod:: simgrid.Mutex.unlock() + .. group-tab:: C .. doxygenfunction:: sg_mutex_lock(sg_mutex_t mutex) @@ -2514,10 +2550,9 @@ Locking #include .. doxygentypedef:: sg_bar_t - .. doxygentypedef:: const_sg_bar_t .. doxygenfunction:: sg_barrier_init(unsigned int count) - .. doxygenfunction:: sg_barrier_destroy(const_sg_bar_t bar) + .. doxygenfunction:: sg_barrier_destroy(sg_bar_t bar) .. doxygenfunction:: sg_barrier_wait(sg_bar_t bar)