/** @brief Communication async
*
* Represents all asynchronous communications, that you can test or wait onto.
*/
/** @brief Communication async
*
* Represents all asynchronous communications, that you can test or wait onto.
*/
- /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an iterator on the finished Comms. */
- template<class I> static
- I wait_any(I first, I last)
+ /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an
+ * iterator on the finished Comms. */
+ template <class I> static I wait_any(I first, I last)
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
(*res)->state_ = finished;
return res;
}
/*! Same as wait_any, but with a timeout. If wait_any_for return because of the timeout last is returned.*/
(*res)->state_ = finished;
return res;
}
/*! Same as wait_any, but with a timeout. If wait_any_for return because of the timeout last is returned.*/
- template<class I> static
- I wait_any_for(I first, I last, double timeout)
+ template <class I> static I wait_any_for(I first, I last, double timeout)
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
{
// Map to dynar<Synchro*>:
xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL);
- static Comm &send_async(MailboxPtr dest, void *data, int simulatedByteAmount);
- /** Creates (but don't start) an async recv onto the mailbox @p from */
- static Comm &recv_init(MailboxPtr from);
+ static Comm& send_async(MailboxPtr dest, void* data, int simulatedByteAmount);
+ /** Creates (but don't start) an async recv onto the mailbox @p from */
+ static Comm& recv_init(MailboxPtr from);
/** Specify the size of the data to send */
void setSrcDataSize(size_t size);
/** Specify the data to send and its size */
/** Specify the size of the data to send */
void setSrcDataSize(size_t size);
/** Specify the data to send and its size */
- int (*matchFunction_)(void *, void *, smx_activity_t) = nullptr;
- void (*cleanFunction_)(void *) = nullptr;
+ int (*matchFunction_)(void*, void*, smx_activity_t) = nullptr;
+ void (*cleanFunction_)(void*) = nullptr;